Learn R Programming

⚠️There's a newer version (3.3-3) of this package.Take me there.

spatstat.geom (version 2.2-0)

Geometrical Functionality of the 'spatstat' Family

Description

Defines types of spatial data such as point patterns, mainly in two dimensions, but also in higher dimensions. Provides class support, and functions for geometrical operations on spatial data, used in the 'spatstat' family of packages. Excludes spatial data on a linear network, which are covered by the separate package 'spatstat.linnet'.

Copy Link

Version

Install

install.packages('spatstat.geom')

Monthly Downloads

66,163

Version

2.2-0

License

GPL (>= 2)

Maintainer

Last Published

June 15th, 2021

Functions in spatstat.geom (2.2-0)

Extract.listof

Extract or Replace Subset of a List of Things
Extract.splitppp

Extract or Replace Sub-Patterns
anyNA.im

Check Whether Image Contains NA Values
anylist

List of Objects
Extract.solist

Extract or Replace Subset of a List of Spatial Objects
Extract.ppp

Extract or Replace Subset of Point Pattern
Extract.ppx

Extract Subset of Multidimensional Point Pattern
Extract.owin

Extract Subset of Window
Math.im

S3 Group Generic methods for images
Window

Extract or Change the Window of a Spatial Object
add.texture

Fill Plot With Texture
Math.imlist

S3 Group Generic methods for List of Images
append.psp

Combine Two Line Segment Patterns
as.data.frame.im

Convert Pixel Image to Data Frame
as.data.frame.owin

Convert Window to Data Frame
affine

Apply Affine Transformation
affine.im

Apply Affine Transformation To Pixel Image
WindowOnly

Extract Window of Spatial Object
areaGain

Difference of Disc Areas
affine.owin

Apply Affine Transformation To Window
area.owin

Area of a Window
applynbd

Apply Function to Every Neighbourhood in a Point Pattern
Extract.hyperframe

Extract or Replace Subset of Hyperframe
as.data.frame.ppp

Coerce Point Pattern to a Data Frame
Extract.anylist

Extract or Replace Subset of a List of Things
affine.tess

Apply Geometrical Transformation To Tessellation
Extract.im

Extract Subset of Image
affine.ppp

Apply Affine Transformation To Point Pattern
Frame

Extract or Change the Containing Rectangle of a Spatial Object
as.data.frame.psp

Coerce Line Segment Pattern to a Data Frame
Extract.layered

Extract or Replace Subset of a Layered Object
Extract.tess

Extract or Replace Subset of Tessellation
affine.psp

Apply Affine Transformation To Line Segment Pattern
as.function.tess

Convert a Tessellation to a Function
as.function.owin

Convert Window to Indicator Function
as.ppp

Convert Data To Class ppp
as.psp

Convert Data To Class psp
as.polygonal

Convert a Window to a Polygonal Window
as.owin

Convert Data To Class owin
bdist.points

Distance to Boundary of Window
bdist.tiles

Distance to Boundary of Window
as.hyperframe.ppx

Extract coordinates and marks of multidimensional point pattern
as.box3

Convert Data to Three-Dimensional Box
as.mask.psp

Convert Line Segment Pattern to Binary Pixel Mask
as.hyperframe

Convert Data to Hyperframe
boundingcircle

Smallest Enclosing Circle
as.mask

Pixel Image Approximation of a Window
areaLoss

Difference of Disc Areas
by.im

Apply Function to Image Broken Down by Factor
box3

Three-Dimensional Box
as.boxx

Convert Data to Multi-Dimensional Box
as.im

Convert to Pixel Image
by.ppp

Apply a Function to a Point Pattern Broken Down by Factor
angles.psp

Orientation Angles of Line Segments
as.data.frame.hyperframe

Coerce Hyperframe to Data Frame
clickdist

Interactively Measure Distance
clickpoly

Interactively Define a Polygon
bounding.box.xy

Convex Hull of Points
beachcolours

Create Colour Scheme for a Range of Numbers
as.rectangle

Window Frame
border

Border Region of a Window
as.solist

Convert List of Two-Dimensional Spatial Objects
as.layered

Convert Data To Layered Object
closepairs

Close Pairs of Points
closepairs.pp3

Close Pairs of Points in 3 Dimensions
contour.imlist

Array of Contour Plots
chop.tess

Subdivide a Window or Tessellation using a Set of Lines
boundingbox

Bounding Box of a Window, Image, or Point Pattern
bufftess

Buffer Distance Tessellation
convexhull

Convex Hull
clickppp

Interactively Add Points
clickbox

Interactively Define a Rectangle
clip.infline

Intersect Infinite Straight Lines with a Window
complement.owin

Take Complement of a Window
as.data.frame.tess

Convert Tessellation to Data Frame
connected.tess

Connected Components of Tiles of a Tessellation
boxx

Multi-Dimensional Box
crossdist.ppp

Pairwise distances between two different point patterns
crossdist.pp3

Pairwise distances between two different three-dimensional point patterns
concatxy

Concatenate x,y Coordinate Vectors
contour.im

Contour plot of pixel image
as.matrix.im

Convert Pixel Image to Matrix or Array
as.function.im

Convert Pixel Image to Function of Coordinates
bdist.pixels

Distance to Boundary of Window
as.matrix.owin

Convert Pixel Image to Matrix
as.tess

Convert Data To Tessellation
centroid.owin

Centroid of a window
colourtools

Convert and Compare Colours in Different Formats
cbind.hyperframe

Combine Hyperframes by Rows or by Columns
closetriples

Close Triples of Points
closing

Morphological Closing
deltametric

Delta Metric
diameter

Diameter of an Object
convolve.im

Convolution of Pixel Images
coords

Extract or Change Coordinates of a Spatial or Spatiotemporal Point Pattern
connected

Connected components
connected.ppp

Connected Components of a Point Pattern
corners

Corners of a rectangle
commonGrid

Determine A Common Spatial Domain And Pixel Resolution
colourmap

Colour Lookup Tables
crossdist.ppx

Pairwise Distances Between Two Different Multi-Dimensional Point Patterns
covering

Cover Region with Discs
crossdist.psp

Pairwise distances between two different line segment patterns
dilated.areas

Areas of Morphological Dilations
diameter.owin

Diameter of a Window
dirichletWeights

Compute Quadrature Weights Based on Dirichlet Tessellation
disc

Circular Window
discs

Union of Discs
convexify

Weil's Convexifying Operation
cut.ppp

Classify Points in a Point Pattern
default.dummy

Generate a Default Pattern of Dummy Points
distmap.ppp

Distance Map of Point Pattern
convexhull.xy

Convex Hull of Points
distfun

Distance Map as a Function
distmap.owin

Distance Map of Window
distmap

Distance Map
eroded.areas

Areas of Morphological Erosions
distmap.psp

Distance Map of Line Segment Pattern
endpoints.psp

Endpoints of Line Segment Pattern
dirichletAreas

Compute Areas of Tiles in Dirichlet Tessellation
duplicated.ppp

Determine Duplicated Points in a Spatial Point Pattern
domain

Extract the Domain of any Spatial Object
dirichletVertices

Vertices and Edges of Dirichlet Tessellation
erosion

Morphological Erosion by a Disc
funxy

Spatial Function Class
erosionAny

Morphological Erosion of Windows
delaunayDistance

Distance on Delaunay Triangulation
delaunay

Delaunay Triangulation of Point Pattern
dilation

Morphological Dilation
gridcentres

Rectangular grid of points
compatible

Test Whether Objects Are Compatible
fourierbasis

Fourier Basis Functions
compatible.im

Test Whether Pixel Images Are Compatible
colouroutputs

Extract or Assign Colour Values in a Colour Map
ellipse

Elliptical Window.
flipxy

Exchange X and Y Coordinates
edit.ppp

Invoke Text Editor on Spatial Data
hextess

Hexagonal Grid or Tessellation
hist.funxy

Histogram of Values of a Spatial Function
crossdist.default

Pairwise distances between two different sets of points
crossdist

Pairwise distances
hist.im

Histogram of Pixel Values in an Image
grow.boxx

Add margins to box in any dimension
harmonise.owin

Make Windows Compatible
gridweights

Compute Quadrature Weights Based on Grid Counts
harmonise.im

Make Pixel Images Compatible
hyperframe

Hyper Data Frame
identify.ppp

Identify Points in a Point Pattern
edges2triangles

List Triangles in a Graph
ewcdf

Weighted Empirical Cumulative Distribution Function
dirichlet

Dirichlet Tessellation of Point Pattern
im.object

Class of Images
eval.im

Evaluate Expression Involving Pixel Images
interp.im

Interpolate a Pixel Image
crossing.psp

Crossing Points of Two Line Segment Patterns
edges

Extract Boundary Edges of a Window.
cut.im

Convert Pixel Image from Numeric to Factor
diameter.boxx

Geometrical Calculations for Multi-Dimensional Box
diameter.box3

Geometrical Calculations for Three-Dimensional Box
intensity.psp

Empirical Intensity of Line Segment Pattern
intensity.ppx

Intensity of a Multidimensional Space-Time Point Pattern
headtail

First or Last Part of a Spatial Pattern
identify.psp

Identify Segments in a Line Segment Pattern
has.close

Check Whether Points Have Close Neighbours
interp.colourmap

Interpolate smoothly between specified colours
im.apply

Apply Function Pixelwise to List of Images
intensity.quadratcount

Intensity Estimates Using Quadrat Counts
invoke.symbolmap

Plot Data Using Graphics Symbol Map
discpartarea

Area of Part of Disc
is.connected

Determine Whether an Object is Connected
layerplotargs

Extract or Replace the Plot Arguments of a Layered Object
layered

Create List of Plotting Layers
hotrod

Heat Kernel for a One-Dimensional Rod
inside.boxx

Test Whether Points Are Inside A Multidimensional Box
integral.im

Integral of a Pixel Image
inside.owin

Test Whether Points Are Inside A Window
infline

Infinite Straight Lines
im

Create a Pixel Image Object
is.convex

Test Whether a Window is Convex
is.connected.ppp

Determine Whether a Point Pattern is Connected
discretise

Safely Convert Point Pattern Window to Binary Mask
is.multitype.ppp

Test Whether A Point Pattern is Multitype
is.multitype

Test whether Object is Multitype
intersect.owin

Intersection, Union or Set Subtraction of Windows
is.rectangle

Determine Type of Window
levelset

Level Set of a Pixel Image
is.subset.owin

Determine Whether One Window is Contained In Another
lut

Lookup Tables
intersect.tess

Intersection of Two Tessellations
marks.psp

Marks of a Line Segment Pattern
marks

Marks of a Point Pattern
methods.box3

Methods for Three-Dimensional Box
mean.im

Mean and Median of Pixel Values in an Image
methods.layered

Methods for Layered Objects
methods.ppx

Methods for Multidimensional Space-Time Point Patterns
matchingdist

Distance for a Point Pattern Matching
maxnndist

Compute Minimum or Maximum Nearest-Neighbour Distance
methods.unitname

Methods for Units
incircle

Find Largest Circle Inside Window
methods.boxx

Methods for Multi-Dimensional Box
methods.pp3

Methods for three-dimensional point patterns
multiplicity.ppp

Count Multiplicity of Duplicate Points
nnmap

K-th Nearest Point Map
midpoints.psp

Midpoints of Line Segment Pattern
nnmark

Mark of Nearest Neighbour
nncross

Nearest Neighbours Between Two Patterns
nnwhich.ppx

Nearest Neighbours in Any Dimensions
nncross.pp3

Nearest Neighbours Between Two Patterns in 3D
is.linim

Test Whether an Object is a Pixel Image on a Linear Network
intersect.boxx

Intersection Of Boxes Of Arbitrary Dimension
is.lpp

Test Whether An Object Is A Point Pattern on a Linear Network
is.ppp

Test Whether An Object Is A Point Pattern
nobjects

Count Number of Geometrical Objects in a Spatial Dataset
nearestsegment

Find Line Segment Nearest to Each Point
nndist.psp

Nearest neighbour distances between line segments
nestsplit

Nested Split
mergeLevels

Merge Levels of a Factor
edges2vees

List Dihedral Triples in a Graph
nnfun

Nearest Neighbour Index Map as a Function
nvertices

Count Number of Vertices
nndist.pp3

Nearest neighbour distances in three dimensions
pairdist.default

Pairwise distances
pairdist

Pairwise distances
owin

Create a Window
nndist.ppx

Nearest Neighbour Distances in Any Dimensions
pairdist.pp3

Pairwise distances in Three Dimensions
fardist

Farthest Distance to Boundary of Window
overlap.owin

Compute Area of Overlap
pairdist.ppp

Pairwise distances
extrapolate.psp

Extrapolate Line Segments to Obtain Infinite Lines
opening

Morphological Opening
edit.hyperframe

Invoke Text Editor on Hyperframe
nearestValue

Image of Nearest Defined Pixel Value
is.owin

Test Whether An Object Is A Window
perimeter

Perimeter Length of Window
intensity.ppp

Empirical Intensity of Point Pattern
grow.rectangle

Add margins to rectangle
nnwhich.pp3

Nearest neighbours in three dimensions
persp.im

Perspective Plot of Pixel Image
perspPoints

Draw Points or Lines on a Surface Viewed in Perspective
pixellate.owin

Convert Window to Pixel Image
periodify

Make Periodic Copies of a Spatial Pattern
pixellate.ppp

Convert Point Pattern to Pixel Image
plot.layered

Layered Plot
plot.imlist

Plot a List of Images
pixelquad

Quadrature Scheme Based on Pixel Grid
pixellate.psp

Convert Line Segment Pattern to Pixel Image
padimage

Pad the Border of a Pixel Image
plot.im

Plot a Pixel Image
layout.boxes

Generate a Row or Column Arrangement of Rectangles.
owin.object

Class owin
nearest.raster.point

Find Pixel Nearest to a Given Point
lengths_psp

Lengths of Line Segments
plot.hyperframe

Plot Entries in a Hyperframe
pixellate

Convert Spatial Object to Pixel Image
pixelcentres

Extract Pixel Centres as Point Pattern
marks.tess

Marks of a Tessellation
harmonise

Make Objects Compatible
plot.quadratcount

Plot Quadrat Counts
plot.owin

Plot a Spatial Window
plot.pp3

Plot a Three-Dimensional Point Pattern
plot.solist

Plot a List of Spatial Objects
plot.tess

Plot a Tessellation
plot.symbolmap

Plot a Graphics Symbol Map
nndist

Nearest neighbour distances
plot.splitppp

Plot a List of Point Patterns
imcov

Spatial Covariance of a Pixel Image
plot.texturemap

Plot a Texture Map
plot.quad

Plot a Spatial Quadrature Scheme
plot.psp

plot a Spatial Line Segment Pattern
pppmatching.object

Class of Point Matchings
pppmatching

Create a Point Matching
pp3

Three Dimensional Point Pattern
is.im

Test Whether An Object Is A Pixel Image
is.marked.ppp

Test Whether A Point Pattern is Marked
plot.textstring

Plot a Text String
plot.yardstick

Plot a Yardstick or Scale Bar
ppx

Multidimensional Space-Time Point Pattern
print.quad

Print a Quadrature Scheme
quadscheme.logi

Generate a Logistic Regression Quadrature Scheme from a Point Pattern
print.psp

Print Brief Details of a Line Segment Pattern Dataset
quadscheme

Generate a Quadrature Scheme from a Point Pattern
ppp

Create a Point Pattern
print.im

Print Brief Details of an Image
intensity

Intensity of a Dataset or a Model
psp

Create a Line Segment Pattern
progressreport

Print Progress Reports
project2segment

Move Point To Nearest Line
quantess

Quantile Tessellation
reflect

Reflect In Origin
project2set

Find Nearest Point in a Region
rectdistmap

Distance Map Using Rectangular Distance Metric
quantile.ewcdf

Quantiles of Weighted Empirical Cumulative Distribution Function
ppp.object

Class of Point Patterns
plot.onearrow

Plot an Arrow
plot.listof

Plot a List of Things
is.empty

Test Whether An Object Is Empty
nnwhich

Nearest neighbour
npoints

Number of Points in a Point Pattern
is.marked

Test Whether Marks Are Present
quasirandom

Quasirandom Patterns
quadrats

Divide Region into Quadrats
quadratcount

Quadrat counting for a point pattern
quantile.im

Sample Quantiles of Pixel Image
pairdist.ppx

Pairwise Distances in Any Dimensions
requireversion

Require a Specific Version of a Package
nncross.ppx

Nearest Neighbours Between Two Patterns in Any Dimensions
rescale.ppp

Convert Point Pattern to Another Unit of Length
pppdist

Distance Between Two Point Patterns
rQuasi

Generate Quasirandom Point Pattern in Given Window
rescue.rectangle

Convert Window Back To Rectangle
rotate.psp

Rotate a Line Segment Pattern
rgbim

Create Colour-Valued Pixel Image
rescale

Convert dataset to another unit of length
rescale.psp

Convert Line Segment Pattern to Another Unit of Length
raster.x

Cartesian Coordinates for a Pixel Raster
run.simplepanel

Run Point-and-Click Interface
round.ppp

Apply Numerical Rounding to Spatial Coordinates
rotate

Rotate
rjitter

Random Perturbation of a Point Pattern
ripras

Estimate window from points alone
shift.owin

Apply Vector Translation To Window
shift.im

Apply Vector Translation To Pixel Image
runifrect

Generate N Uniform Random Points in a Rectangle
rotate.owin

Rotate a Window
scalardilate

Apply Scalar Dilation
rounding

Detect Numerical Rounding
rescale.im

Convert Pixel Image to Another Unit of Length
simplepanel

Simple Point-and-Click Interface Panels
solapply

Apply a Function Over a List and Obtain a List of Objects
selfcut.psp

Cut Line Segments Where They Intersect
rsyst

Simulate systematic random point pattern
simplify.owin

Approximate a Polygon by a Simpler Polygon
spatstat.geom-deprecated

Deprecated spatstat.geom functions
rotate.ppp

Rotate a Point Pattern
methods.distfun

Geometrical Operations for Distance Functions
sessionLibs

Print Names and Version Numbers of Libraries Loaded
sidelengths.owin

Side Lengths of Enclosing Rectangle of a Window
solist

List of Two-Dimensional Spatial Objects
shift.psp

Apply Vector Translation To Line Segment Pattern
summary.anylist

Summary of a List of Things
spatdim

Spatial Dimension of a Dataset
spatstat.geom-internal

Internal spatstat.geom functions
subset.hyperframe

Subset of Hyperframe Satisfying A Condition
summary.distfun

Summarizing a Function of Spatial Location
solutionset

Evaluate Logical Expression Involving Pixel Images and Return Region Where Expression is True
markstat

Summarise Marks in Every Neighbourhood in a Point Pattern
split.ppx

Divide Multidimensional Point Pattern into Sub-patterns
split.ppp

Divide Point Pattern into Sub-patterns
summary.splitppp

Summary of a Split Point Pattern
summary.solist

Summary of a List of Spatial Objects
stratrand

Stratified random point pattern
superimpose

Superimpose Several Geometric Patterns
symbolmap

Graphics Symbol Map
shift.ppx

Apply Vector Translation To Box Or Point Pattern In Arbitrary Dimension
methods.funxy

Methods for Spatial Functions
rescale.owin

Convert Window to Another Unit of Length
shift.ppp

Apply Vector Translation To Point Pattern
spatstat.geom-package

The spatstat.geom Package
rlinegrid

Generate grid of parallel lines with random displacement
text.ppp

Add Text Labels to Spatial Pattern
spatstat.options

Internal Options in Spatstat Package
summary.quad

Summarizing a Quadrature Scheme
tileindex

Determine Which Tile Contains Each Given Point
scaletointerval

Rescale Data to Lie Between Specified Limits
spokes

Spokes pattern of dummy points
print.owin

Print Brief Details of a Spatial Window
union.quad

Union of Data and Dummy Points
transmat

Convert Pixel Array Between Different Conventions
triangulate.owin

Decompose Window into Triangles
tilenames

Names of Tiles in a Tessellation
nsegments

Number of Line Segments in a Line Segment Pattern
plot.anylist

Plot a List of Things
unnormdensity

Weighted kernel smoother
unstack.ppp

Separate Multiple Columns of Marks
texturemap

Texture Map
whichhalfplane

Test Which Side of Infinite Line a Point Falls On
zapsmall.im

Rounding of Pixel Values
where.max

Find Location of Maximum in a Pixel Image
yardstick

Text, Arrow or Scale Bar in a Diagram
square

Square Window
plot.ppp

plot a Spatial Point Pattern
volume

Volume of an Object
summary.psp

Summary of a Line Segment Pattern Dataset
pairdist.psp

Pairwise distances between line segments
scanpp

Read Point Pattern From Data File
unique.ppp

Extract Unique Points from a Spatial Point Pattern
rotate.im

Rotate a Pixel Image
print.ppp

Print Brief Details of a Point Pattern Dataset
psp.object

Class of Line Segment Patterns
plot.colourmap

Plot a Colour Map
polartess

Tessellation Using Polar Coordinates
setcov

Set Covariance of a Window
pointsOnLines

Place Points Evenly Along Specified Lines
textureplot

Plot Image or Tessellation Using Texture Fill
tile.areas

Compute Areas of Tiles in a Tessellation
plot.pppmatching

Plot a Point Matching
shift

Apply Vector Translation
tweak.colourmap

Change Colour Values in a Colour Map
weighted.median

Weighted Median, Quantiles or Variance
trim.rectangle

Cut margins from rectangle
timed

Record the Computation Time
timeTaken

Extract the Total Computation Time
test.crossing.psp

Check Whether Segments Cross
unstack.solist

Unstack Each Spatial Object in a List of Objects
subset.psp

Subset of Line Segment Satisfying A Condition
tess

Create a Tessellation
uniquemap.ppp

Map Duplicate Entries to Unique Entries
selfcrossing.psp

Crossing Points in a Line Segment Pattern
uniquemap.default

Map Duplicate Entries to Unique Entries
subset.ppp

Subset of Point Pattern Satisfying A Condition
update.symbolmap

Update a Graphics Symbol Map.
vertices

Vertices of a Window
relevel.im

Reorder Levels of a Factor-Valued Image or Pattern
unitname

Name for Unit of Length
regularpolygon

Create A Regular Polygon
quad.object

Class of Quadrature Schemes
rotate.infline

Rotate or Shift Infinite Lines
summary.owin

Summary of a Spatial Window
summary.im

Summarizing a Pixel Image
whist

Weighted Histogram
split.hyperframe

Divide Hyperframe Into Subsets and Reassemble
summary.ppp

Summary of a Point Pattern Dataset
summary.listof

Summary of a List of Things
venn.tess

Tessellation Delimited by Several Sets
tiles

Extract List of Tiles in a Tessellation
split.im

Divide Image Into Sub-images
with.hyperframe

Evaluate an Expression in Each Row of a Hyperframe
unmark

Remove Marks
tiles.empty

Check For Empty Tiles in a Tessellation
Extract.psp

Extract Subset of Line Segment Pattern
Extract.quad

Subset of Quadrature Scheme
MinkowskiSum

Minkowski Sum of Windows
Replace.im

Reset Values in Subset of Image