Learn R Programming

spatstat.geom (version 3.6-0)

Geometrical Functionality of the 'spatstat' Family

Description

Defines spatial data types and supports geometrical operations on them. Data types include point patterns, windows (domains), pixel images, line segment patterns, tessellations and hyperframes. Capabilities include creation and manipulation of data (using command line or graphical interaction), plotting, geometrical operations (rotation, shift, rescale, affine transformation), convex hull, discretisation and pixellation, Dirichlet tessellation, Delaunay triangulation, pairwise distances, nearest-neighbour distances, distance transform, morphological operations (erosion, dilation, closing, opening), quadrat counting, geometrical measurement, geometrical covariance, colour maps, calculus on spatial domains, Gaussian blur, level sets of images, transects of images, intersections between objects, minimum distance matching. (Excludes spatial data on a network, which are supported by the package 'spatstat.linnet'.)

Copy Link

Version

Install

install.packages('spatstat.geom')

Monthly Downloads

66,586

Version

3.6-0

License

GPL (>= 2)

Maintainer

Adrian Baddeley

Last Published

September 20th, 2025

Functions in spatstat.geom (3.6-0)

Extract.listof

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

Extract or Replace Subset of a Layered Object
Extract.im

Extract Subset of Image
Extract.quad

Subset of Quadrature Scheme
Extract.anylist

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

Extract or Replace Subset of Hyperframe
Extract.owin

Extract Subset of Window
Extract.ppx

Extract Subset of Multidimensional Point Pattern
Extract.ppp

Extract or Replace Subset of Point Pattern
Replace.im

Reset Values in Subset of Image
Math.imlist

S3 Group Generic methods for List of Images
affine.psp

Apply Affine Transformation To Line Segment Pattern
affine.ppp

Apply Affine Transformation To Point Pattern
angles.psp

Orientation Angles of Line Segments
Window.tess

Extract Window of Spatial Object
affine.im

Apply Affine Transformation To Pixel Image
as.data.frame.hyperframe

Coerce Hyperframe to Data Frame
as.colourmap

Convert to Colour Map
as.box3

Convert Data to Three-Dimensional Box
anylist

List of Objects
areaGain

Difference of Disc Areas
applynbd

Apply Function to Every Neighbourhood in a Point Pattern
append.psp

Combine Two Line Segment Patterns
area.owin

Area of a Window
areaLoss

Difference of Disc Areas
as.data.frame.owin

Convert Window to Data Frame
as.data.frame.tess

Convert Tessellation to Data Frame
as.hyperframe

Convert Data to Hyperframe
as.data.frame.im

Convert Pixel Image to Data Frame
as.matrix.im

Convert Pixel Image to Matrix or Array
as.owin

Convert Data To Class owin
as.polygonal

Convert a Window to a Polygonal Window
as.im

Convert to Pixel Image
bdist.points

Distance to Boundary of Window
as.tess

Convert Data To Tessellation
boundingbox

Bounding Box of a Window, Image, or Point Pattern
bdist.tiles

Distance to Boundary of Window
boundingcircle

Smallest Enclosing Circle
bufftess

Buffer Distance Tessellation
chop.tess

Subdivide a Window or Tessellation using a Set of Lines
centroid.owin

Centroid of a window
cbind.hyperframe

Combine Hyperframes by Rows or by Columns
clickpoly

Interactively Define a Polygon
colourtools

Convert and Compare Colours in Different Formats
colouroutputs

Extract or Assign Colour Values in a Colour Map
closetriples

Close Triples of Points
clickppp

Interactively Add Points
closepairs.pp3

Close Pairs of Points in 3 Dimensions
concatxy

Concatenate x,y Coordinate Vectors
connected.ppp

Connected Components of a Point Pattern
compatible

Test Whether Objects Are Compatible
connected.tess

Connected Components of Tiles of a Tessellation
convolve.im

Convolution of Pixel Images
contour.im

Contour plot of pixel image
contour.imlist

Array of Contour Plots
convexmetric

Distance Metric Defined by Convex Set
coords

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

Corners of a rectangle
convexhull

Convex Hull
covering

Cover Region with Discs
perspPoints

Draw Points or Lines on a Surface Viewed in Perspective
persp.im

Perspective Plot of Pixel Image
pixellate.owin

Convert Window to Pixel Image
pixellate

Convert Spatial Object to Pixel Image
pixelcentres

Extract Pixel Centres as Point Pattern
pixellate.ppp

Convert Point Pattern to Pixel Image
perimeter

Perimeter Length of Window
persp.ppp

Perspective Plot of Marked Point Pattern
pairdist.psp

Pairwise distances between line segments
periodify

Make Periodic Copies of a Spatial Pattern
plot.hyperframe

Plot Entries in a Hyperframe
pixellate.psp

Convert Line Segment Pattern to Pixel Image
plot.onearrow

Plot an Arrow
pixelquad

Quadrature Scheme Based on Pixel Grid
plot.im

Plot a Pixel Image
plot.layered

Layered Plot
plot.anylist

Plot a List of Things
plot.colourmap

Plot a Colour Map
plot.imlist

Plot a List of Images
plot.listof

Plot a List of Things
plot.psp

plot a Spatial Line Segment Pattern
plot.pppmatching

Plot a Point Matching
plot.symbolmap

Plot a Graphics Symbol Map
plot.ppp

plot a Spatial Point Pattern
plot.quadratcount

Plot Quadrat Counts
plot.solist

Plot a List of Spatial Objects
plot.splitppp

Plot a List of Point Patterns
plot.owin

Plot a Spatial Window
plot.pp3

Plot a Three-Dimensional Point Pattern
plot.quad

Plot a Spatial Quadrature Scheme
plot.textstring

Plot a Text String
ppp.object

Class of Point Patterns
pointsOnLines

Place Points Evenly Along Specified Lines
polartess

Tessellation Using Polar Coordinates
plot.tess

Plot a Tessellation
plot.yardstick

Plot a Yardstick or Scale Bar
pp3

Three Dimensional Point Pattern
plot.texturemap

Plot a Texture Map
pppdist

Distance Between Two Point Patterns
ppp

Create a Point Pattern
pppmatching.object

Class of Point Matchings
print.quad

Print a Quadrature Scheme
print.ppp

Print Brief Details of a Point Pattern Dataset
project2segment

Move Point To Nearest Line
print.im

Print Brief Details of an Image
progressreport

Print Progress Reports
print.owin

Print Brief Details of a Spatial Window
pppmatching

Create a Point Matching
ppx

Multidimensional Space-Time Point Pattern
print.psp

Print Brief Details of a Line Segment Pattern Dataset
psp.object

Class of Line Segment Patterns
project2set

Find Nearest Point in a Region
quad.object

Class of Quadrature Schemes
quadscheme.logi

Generate a Logistic Regression Quadrature Scheme from a Point Pattern
quantess

Quantile Tessellation
psp2mask

Convert Line Segment Pattern to Binary Pixel Mask
quadscheme

Generate a Quadrature Scheme from a Point Pattern
requireversion

Require a Specific Version of a Package
quadratcount

Quadrat counting for a point pattern
psp

Create a Line Segment Pattern
raster.x

Cartesian Coordinates for a Pixel Raster
quantile.im

Sample Quantiles of Pixel Image
quadrats

Divide Region into Quadrats
quantilefun.im

Quantile Function for Images
reflect

Reflect In Origin
relevel.im

Reorder Levels of a Factor-Valued Image or Pattern
rectdistmap

Distance Map Using Rectangular Distance Metric
quasirandom

Quasirandom Patterns
rev.colourmap

Reverse the Colours in a Colour Map
restrict.colourmap

Restrict a Colour Map to a Subset of Values
rescale.owin

Convert Window to Another Unit of Length
regularpolygon

Create A Regular Polygon
ripras

Estimate window from points alone
rescue.rectangle

Convert Window Back To Rectangle
rescale.ppp

Convert Point Pattern to Another Unit of Length
rescale.psp

Convert Line Segment Pattern to Another Unit of Length
rgbim

Create Colour-Valued Pixel Image
rescale

Convert dataset to another unit of length
rQuasi

Generate Quasirandom Point Pattern in Given Window
rescale.im

Convert Pixel Image to Another Unit of Length
rlinegrid

Generate grid of parallel lines with random displacement
round.ppp

Apply Numerical Rounding to Spatial Coordinates
rjitter

Random Perturbation of a Point Pattern
rotate.infline

Rotate or Shift Infinite Lines
rotate.im

Rotate a Pixel Image
rexplode

Explode a Point Pattern by Displacing Duplicated Points
rotate

Rotate
rotate.ppp

Rotate a Point Pattern
rotate.psp

Rotate a Line Segment Pattern
runifrect

Generate N Uniform Random Points in a Rectangle
rotate.owin

Rotate a Window
selfcut.psp

Cut Line Segments Where They Intersect
scaletointerval

Rescale Data to Lie Between Specified Limits
rsyst

Simulate systematic random point pattern
scalardilate

Apply Scalar Dilation
scanpp

Read Point Pattern From Data File
sessionLibs

Print Names and Version Numbers of Libraries Loaded
run.simplepanel

Run Point-and-Click Interface
selfcrossing.psp

Crossing Points in a Line Segment Pattern
rounding.ppp

Detect Numerical Rounding
simplify.owin

Approximate a Window by a Simpler Polygon
shift.im

Apply Vector Translation To Pixel Image
sidelengths.owin

Side Lengths of Enclosing Rectangle of a Window
shift.psp

Apply Vector Translation To Line Segment Pattern
shift

Apply Vector Translation
shift.owin

Apply Vector Translation To Window
setcov

Set Covariance of a Window
simplepanel

Simple Point-and-Click Interface Panels
shift.ppp

Apply Vector Translation To Point Pattern
shift.ppx

Apply Vector Translation To Box Or Point Pattern In Arbitrary Dimension
split.hyperframe

Divide Hyperframe Into Subsets and Reassemble
spatdim

Spatial Dimension of a Dataset
spatstat.geom-deprecated

Deprecated spatstat.geom functions
spatstat.options

Internal Options in Spatstat Package
spatstat.geom-internal

Internal spatstat.geom functions
split.im

Divide Image Into Sub-images
solist

List of Two-Dimensional Spatial Objects
solapply

Apply a Function Over a List and Obtain a List of Objects
solutionset

Evaluate Logical Expression Involving Pixel Images and Return Region Where Expression is True
spatstat.geom-package

The spatstat.geom Package
stratrand

Stratified random point pattern
subset.psp

Subset of Line Segment Satisfying A Condition
summary.anylist

Summary of a List of Things
square

Square Window
spokes

Spokes pattern of dummy points
split.ppp

Divide Point Pattern into Sub-patterns
summary.distfun

Summarizing a Function of Spatial Location
subset.ppp

Subset of Point Pattern Satisfying A Condition
subset.hyperframe

Subset of Hyperframe Satisfying A Condition
split.ppx

Divide Multidimensional Point Pattern into Sub-patterns
summary.owin

Summary of a Spatial Window
summary.splitppp

Summary of a Split Point Pattern
summary.listof

Summary of a List of Things
summary.solist

Summary of a List of Spatial Objects
summary.im

Summarizing a Pixel Image
summary.ppp

Summary of a Point Pattern Dataset
summary.quad

Summarizing a Quadrature Scheme
summary.psp

Summary of a Line Segment Pattern Dataset
symbolmap

Graphics Symbol Map
superimpose

Superimpose Several Geometric Patterns
text.ppp

Add Text Labels to Spatial Pattern
tiles

Extract List of Tiles in a Tessellation
test.crossing.psp

Check Whether Segments Cross
tess

Create a Tessellation
tiles.empty

Check For Empty Tiles in a Tessellation
tile.areas

Compute Areas of Tiles in a Tessellation
texturemap

Texture Map
textureplot

Plot Image or Tessellation Using Texture Fill
tilenames

Names of Tiles in a Tessellation
tileindex

Determine Which Tile Contains Each Given Point
timeTaken

Extract the Total Computation Time
tweak.colourmap

Change Colour Values in a Colour Map
union.quad

Union of Data and Dummy Points
transmat

Convert Pixel Array Between Different Conventions
triangulate.owin

Decompose Window into Triangles
uniquemap.ppp

Map Duplicate Entries to Unique Entries
timed

Record the Computation Time
trim.rectangle

Cut margins from rectangle
unitname

Name for Unit of Length
unique.ppp

Extract Unique Points from a Spatial Point Pattern
update.symbolmap

Update a Graphics Symbol Map.
unstack.solist

Unstack Each Spatial Object in a List of Objects
venn.tess

Tessellation Delimited by Several Sets
whichhalfplane

Test Which Side of Infinite Line a Point Falls On
vertices

Vertices of a Window
where.max

Find Location of Maximum in a Pixel Image
unstack.ppp

Separate Multiple Columns of Marks
with.hyperframe

Evaluate an Expression in Each Row of a Hyperframe
yardstick

Text, Arrow or Scale Bar in a Diagram
volume

Volume of an Object
unmark

Remove Marks
zapsmall.im

Rounding of Pixel Values
Extract.splitppp

Extract or Replace Sub-Patterns
Math.im

S3 Group Generic methods for images
Window

Extract or Change the Window of a Spatial Object
MinkowskiSum

Minkowski Sum of Windows
Extract.tess

Extract or Replace Subset of Tessellation
anyNA.im

Check Whether Image Contains NA Values
add.texture

Fill Plot With Texture
affine.owin

Apply Affine Transformation To Window
as.boxx

Convert Data to Multi-Dimensional Box
as.data.frame.psp

Coerce Line Segment Pattern to a Data Frame
as.hyperframe.ppx

Extract coordinates and marks of multidimensional point pattern
as.function.im

Convert Pixel Image to Function of Coordinates
as.function.tess

Convert a Tessellation to a Function
as.psp

Convert Data To Class psp
as.rectangle

Window Frame
as.ppp

Convert Data To Class ppp
as.layered

Convert Data To Layered Object
bounding.box.xy

Convex Hull of Points
beachcolours

Create Colour Scheme for a Range of Numbers
border

Border Region of a Window
box3

Three-Dimensional Box
clickbox

Interactively Define a Rectangle
by.ppp

Apply a Function to a Point Pattern Broken Down by Factor
by.im

Apply Function to Image Broken Down by Factor
boxx

Multi-Dimensional Box
clickdist

Interactively Measure Distance
closepairs

Close Pairs of Points
clip.infline

Intersect Infinite Straight Lines with a Window
connected

Connected components
convexhull.xy

Convex Hull of Points
crossdist.ppp

Pairwise distances between two different point patterns
crossing.psp

Crossing Points of Two Line Segment Patterns
default.symbolmap

Default Symbol Map for Plotting a Spatial Pattern
cut.im

Convert Pixel Image from Numeric to Factor
default.image.colours

Default Colours for Images in Spatstat
crossdist.ppx

Pairwise Distances Between Two Different Multi-Dimensional Point Patterns
crossdist.pp3

Pairwise distances between two different three-dimensional point patterns
diameter

Diameter of an Object
dilated.areas

Areas of Morphological Dilations
deltametric

Delta Metric
diameter.boxx

Geometrical Calculations for Multi-Dimensional Box
diameter.owin

Diameter of a Window
dilation

Morphological Dilation
default.symbolmap.ppp

Default Symbol Map for Point Pattern
delaunayDistance

Distance on Delaunay Triangulation
disc

Circular Window
dirichletWeights

Compute Quadrature Weights Based on Dirichlet Tessellation
dirichletVertices

Vertices and Edges of Dirichlet Tessellation
dirichlet

Dirichlet Tessellation of Point Pattern
distmap

Distance Map
dirichletAreas

Compute Areas of Tiles in Dirichlet Tessellation
distfun

Distance Map as a Function
discs

Union of Discs
distmap.psp

Distance Map of Line Segment Pattern
edges

Extract Boundary Edges of a Window.
edges2triangles

List Triangles in a Graph
distmap.owin

Distance Map of Window
extrapolate.psp

Extrapolate Line Segments to Obtain Infinite Lines
flipxy

Exchange X and Y Coordinates
erosion

Morphological Erosion by a Disc
eroded.areas

Areas of Morphological Erosions
fillholes.owin

Remove Small Holes in a Window
ellipse

Elliptical Window.
eval.im

Evaluate Expression Involving Pixel Images
erosionAny

Morphological Erosion of Windows
harmonise

Make Objects Compatible
grow.rectangle

Add margins to rectangle
harmonise.owin

Make Windows Compatible
funxy

Spatial Function Class
hist.funxy

Histogram of Values of a Spatial Function
hextess

Hexagonal Grid or Tessellation
has.close

Check Whether Points Have Close Neighbours
headtail

First or Last Part of a Spatial Pattern
identify.psp

Identify Segments in a Line Segment Pattern
hyperframe

Hyper Data Frame
identify.ppp

Identify Points in a Point Pattern
infline

Infinite Straight Lines
im.object

Class of Images
im

Create a Pixel Image Object
inside.boxx

Test Whether Points Are Inside A Multidimensional Box
intersect.owin

Intersection, Union or Set Subtraction of Windows
intensity.ppx

Intensity of a Multidimensional Space-Time Point Pattern
intensity.quadratcount

Intensity Estimates Using Quadrat Counts
interp.colourmap

Interpolate smoothly between specified colours
intensity.psp

Empirical Intensity of Line Segment Pattern
intensity

Intensity of a Dataset or a Model
interp.im

Interpolate a Pixel Image
is.connected

Determine Whether an Object is Connected
is.NAobject

Recognise NA Objects
is.linim

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

Test Whether a Window is Convex
is.im

Test Whether An Object Is A Pixel Image
is.marked

Test Whether Marks Are Present
is.owin

Test Whether An Object Is A Window
is.linnet

Test Whether An Object Is A Linear Network
invoke.metric

Perform Geometric Task using a Specified Metric
is.multitype

Test whether Object is Multitype
is.multitype.ppp

Test Whether A Point Pattern is Multitype
invoke.symbolmap

Plot Data Using Graphics Symbol Map
is.na.solist

Identify Missing Entries in a List of Spatial Objects
is.na.hyperframe

Identify Missing Entries in a Hyperframe
is.lpp

Test Whether An Object Is A Point Pattern on a Linear Network
marks

Marks of a Point Pattern
layout.boxes

Generate a Row or Column Arrangement of Rectangles.
layered

Create List of Plotting Layers
is.subset.owin

Determine Whether One Window is Contained In Another
layerplotargs

Extract or Replace the Plot Arguments of a Layered Object
matchingdist

Distance for a Point Pattern Matching
markstat

Summarise Marks in Every Neighbourhood in a Point Pattern
methods.boxx

Methods for Multi-Dimensional Box
mean.im

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

Geometrical Operations for Distance Functions
marks.tess

Marks of a Tessellation
nearest.raster.point

Find Pixel Nearest to a Given Point
methods.ppx

Methods for Multidimensional Space-Time Point Patterns
nearestsegment

Find Line Segment Nearest to Each Point
methods.pp3

Methods for three-dimensional point patterns
nearestValue

Image of Nearest Defined Pixel Value
midpoints.psp

Midpoints of Line Segment Pattern
methods.layered

Methods for Layered Objects
methods.unitname

Methods for Units
nndist.psp

Nearest neighbour distances between line segments
nncross.ppx

Nearest Neighbours Between Two Patterns in Any Dimensions
nncross

Nearest Neighbours Between Two Patterns
nestsplit

Nested Split
nndist

Nearest neighbour distances
opening

Morphological Opening
npoints

Number of Points in a Point Pattern
nnwhich.ppx

Nearest Neighbours in Any Dimensions
nobjects

Count Number of Geometrical Objects in a Spatial Dataset
overlap.owin

Compute Area of Overlap
nnmark

Mark of Nearest Neighbour
pairdist.pp3

Pairwise distances in Three Dimensions
pairdist

Pairwise distances
pairdist.default

Pairwise distances
padimage

Pad the Border of a Pixel Image
pairdist.ppx

Pairwise Distances in Any Dimensions
owin

Create a Window