Learn R Programming

spatstat.geom (version 3.3-5)

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

53,883

Version

3.3-5

License

GPL (>= 2)

Maintainer

Adrian Baddeley

Last Published

January 18th, 2025

Functions in spatstat.geom (3.3-5)

Extract.im

Extract Subset of Image
Extract.layered

Extract or Replace Subset of a Layered Object
Math.im

S3 Group Generic methods for images
Math.imlist

S3 Group Generic methods for List of Images
MinkowskiSum

Minkowski Sum of Windows
append.psp

Combine Two Line Segment Patterns
applynbd

Apply Function to Every Neighbourhood in a Point Pattern
Replace.im

Reset Values in Subset of Image
as.data.frame.psp

Coerce Line Segment Pattern to a Data Frame
affine.ppp

Apply Affine Transformation To Point Pattern
as.data.frame.tess

Convert Tessellation to Data Frame
boundingcircle

Smallest Enclosing Circle
affine.psp

Apply Affine Transformation To Line Segment Pattern
box3

Three-Dimensional Box
area.owin

Area of a Window
areaGain

Difference of Disc Areas
by.im

Apply Function to Image Broken Down by Factor
by.ppp

Apply a Function to a Point Pattern Broken Down by Factor
as.owin

Convert Data To Class owin
as.polygonal

Convert a Window to a Polygonal Window
colourtools

Convert and Compare Colours in Different Formats
commonGrid

Determine A Common Spatial Domain And Pixel Resolution
connected.tess

Connected Components of Tiles of a Tessellation
contour.im

Contour plot of pixel image
bounding.box.xy

Convex Hull of Points
boundingbox

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

Interactively Measure Distance
clickpoly

Interactively Define a Polygon
Extract.ppp

Extract or Replace Subset of Point Pattern
Extract.ppx

Extract Subset of Multidimensional Point Pattern
affine.tess

Apply Geometrical Transformation To Tessellation
closepairs

Close Pairs of Points
crossdist.default

Pairwise distances between two different sets of points
Extract.listof

Extract or Replace Subset of a List of Things
crossdist.pp3

Pairwise distances between two different three-dimensional point patterns
Extract.owin

Extract Subset of Window
closepairs.pp3

Close Pairs of Points in 3 Dimensions
cut.im

Convert Pixel Image from Numeric to Factor
angles.psp

Orientation Angles of Line Segments
cut.ppp

Classify Points in a Point Pattern
as.data.frame.hyperframe

Coerce Hyperframe to Data Frame
coords

Extract or Change Coordinates of a Spatial or Spatiotemporal Point Pattern
Extract.solist

Extract or Replace Subset of a List of Spatial Objects
as.data.frame.im

Convert Pixel Image to Data Frame
diameter.box3

Geometrical Calculations for Three-Dimensional Box
Extract.splitppp

Extract or Replace Sub-Patterns
as.function.im

Convert Pixel Image to Function of Coordinates
corners

Corners of a rectangle
add.texture

Fill Plot With Texture
default.symbolmap

Default Symbol Map for Plotting a Spatial Pattern
affine

Apply Affine Transformation
default.symbolmap.ppp

Default Symbol Map for Point Pattern
as.function.owin

Convert Window to Indicator Function
diameter.boxx

Geometrical Calculations for Multi-Dimensional Box
delaunay

Delaunay Triangulation of Point Pattern
as.layered

Convert Data To Layered Object
as.mask

Pixel Image Approximation of a Window
delaunayDistance

Distance on Delaunay Triangulation
as.tess

Convert Data To Tessellation
Extract.anylist

Extract or Replace Subset of a List of Things
dirichletAreas

Compute Areas of Tiles in Dirichlet Tessellation
areaLoss

Difference of Disc Areas
Extract.hyperframe

Extract or Replace Subset of Hyperframe
as.box3

Convert Data to Three-Dimensional Box
dirichletWeights

Compute Quadrature Weights Based on Dirichlet Tessellation
disc

Circular Window
dirichletVertices

Vertices and Edges of Dirichlet Tessellation
Window

Extract or Change the Window of a Spatial Object
as.hyperframe.ppx

Extract coordinates and marks of multidimensional point pattern
as.im

Convert to Pixel Image
edges

Extract Boundary Edges of a Window.
edges2triangles

List Triangles in a Graph
fardist

Farthest Distance to Boundary of Window
Window.tess

Extract Window of Spatial Object
eval.im

Evaluate Expression Involving Pixel Images
as.ppp

Convert Data To Class ppp
extrapolate.psp

Extrapolate Line Segments to Obtain Infinite Lines
funxy

Spatial Function Class
affine.im

Apply Affine Transformation To Pixel Image
bdist.pixels

Distance to Boundary of Window
gridcentres

Rectangular grid of points
affine.owin

Apply Affine Transformation To Window
identify.psp

Identify Segments in a Line Segment Pattern
as.data.frame.owin

Convert Window to Data Frame
flipxy

Exchange X and Y Coordinates
harmonise.im

Make Pixel Images Compatible
im

Create a Pixel Image Object
intensity.ppx

Intensity of a Multidimensional Space-Time Point Pattern
as.psp

Convert Data To Class psp
bdist.points

Distance to Boundary of Window
bdist.tiles

Distance to Boundary of Window
intensity.psp

Empirical Intensity of Line Segment Pattern
clickppp

Interactively Add Points
cbind.hyperframe

Combine Hyperframes by Rows or by Columns
centroid.owin

Centroid of a window
clip.infline

Intersect Infinite Straight Lines with a Window
intersect.owin

Intersection, Union or Set Subtraction of Windows
contour.imlist

Array of Contour Plots
convexhull

Convex Hull
harmonise.owin

Make Windows Compatible
intersect.tess

Intersection of Two Tessellations
is.marked.ppp

Test Whether A Point Pattern is Marked
is.multitype

Test whether Object is Multitype
as.data.frame.ppp

Coerce Point Pattern to a Data Frame
intensity

Intensity of a Dataset or a Model
intensity.quadratcount

Intensity Estimates Using Quadrat Counts
as.matrix.im

Convert Pixel Image to Matrix or Array
is.subset.owin

Determine Whether One Window is Contained In Another
intensity.ppp

Empirical Intensity of Point Pattern
Extract.psp

Extract Subset of Line Segment Pattern
as.matrix.owin

Convert Pixel Image to Matrix
beachcolours

Create Colour Scheme for a Range of Numbers
colourmap

Colour Lookup Tables
layered

Create List of Plotting Layers
nearestsegment

Find Line Segment Nearest to Each Point
metric.object

Distance Metric
colouroutputs

Extract or Assign Colour Values in a Colour Map
border

Border Region of a Window
Extract.quad

Subset of Quadrature Scheme
Extract.tess

Extract or Replace Subset of Tessellation
Frame

Extract or Change the Containing Rectangle of a Spatial Object
anyNA.im

Check Whether Image Contains NA Values
connected

Connected components
convexmetric

Distance Metric Defined by Convex Set
interp.colourmap

Interpolate smoothly between specified colours
anylist

List of Objects
as.boxx

Convert Data to Multi-Dimensional Box
boxx

Multi-Dimensional Box
as.colourmap

Convert to Colour Map
bufftess

Buffer Distance Tessellation
convolve.im

Convolution of Pixel Images
connected.ppp

Connected Components of a Point Pattern
maxnndist

Compute Minimum or Maximum Nearest-Neighbour Distance
diameter.owin

Diameter of a Window
covering

Cover Region with Discs
mean.im

Mean and Median of Pixel Values in an Image
closetriples

Close Triples of Points
as.function.tess

Convert a Tessellation to a Function
crossdist

Pairwise distances
dilated.areas

Areas of Morphological Dilations
plot.layered

Layered Plot
closing

Morphological Closing
edit.ppp

Invoke Text Editor on Spatial Data
is.connected.ppp

Determine Whether a Point Pattern is Connected
ellipse

Elliptical Window.
as.hyperframe

Convert Data to Hyperframe
complement.owin

Take Complement of a Window
as.rectangle

Window Frame
methods.unitname

Methods for Units
crossdist.ppp

Pairwise distances between two different point patterns
as.solist

Convert List of Two-Dimensional Spatial Objects
pairdist.pp3

Pairwise distances in Three Dimensions
chop.tess

Subdivide a Window or Tessellation using a Set of Lines
crossdist.ppx

Pairwise Distances Between Two Different Multi-Dimensional Point Patterns
nnfun

Nearest Neighbour Index Map as a Function
clickbox

Interactively Define a Rectangle
endpoints.psp

Endpoints of Line Segment Pattern
invoke.symbolmap

Plot Data Using Graphics Symbol Map
pixellate.ppp

Convert Point Pattern to Pixel Image
compatible

Test Whether Objects Are Compatible
compatible.im

Test Whether Pixel Images Are Compatible
eroded.areas

Areas of Morphological Erosions
nearest.raster.point

Find Pixel Nearest to a Given Point
overlap.owin

Compute Area of Overlap
concatxy

Concatenate x,y Coordinate Vectors
grow.rectangle

Add margins to rectangle
invoke.metric

Perform Geometric Task using a Specified Metric
nearestValue

Image of Nearest Defined Pixel Value
crossdist.psp

Pairwise distances between two different line segment patterns
convexhull.xy

Convex Hull of Points
deltametric

Delta Metric
edges2vees

List Dihedral Triples in a Graph
convexify

Weil's Convexifying Operation
diameter

Diameter of an Object
is.convex

Test Whether a Window is Convex
shift

Apply Vector Translation
mergeLevels

Merge Levels of a Factor
default.dummy

Generate a Default Pattern of Dummy Points
crossing.psp

Crossing Points of Two Line Segment Patterns
discs

Union of Discs
harmonise

Make Objects Compatible
plot.textstring

Plot a Text String
split.im

Divide Image Into Sub-images
hist.funxy

Histogram of Values of a Spatial Function
distfun

Distance Map as a Function
methods.box3

Methods for Three-Dimensional Box
nndist.psp

Nearest neighbour distances between line segments
hist.im

Histogram of Pixel Values in an Image
pixellate.psp

Convert Line Segment Pattern to Pixel Image
default.image.colours

Default Colours for Images in Spatstat
plot.anylist

Plot a List of Things
summary.listof

Summary of a List of Things
rotate.im

Rotate a Pixel Image
distmap

Distance Map
distmap.owin

Distance Map of Window
plot.splitppp

Plot a List of Point Patterns
pairdist.ppx

Pairwise Distances in Any Dimensions
methods.pp3

Methods for three-dimensional point patterns
framedist.pixels

Distance to Bounding Frame
domain

Extract the Domain of any Spatial Object
pairdist.psp

Pairwise distances between line segments
pHcolourmap

Colour Map for pH Values
requireversion

Require a Specific Version of a Package
quadrats

Divide Region into Quadrats
edit.hyperframe

Invoke Text Editor on Hyperframe
is.ppp

Test Whether An Object Is A Point Pattern
is.rectangle

Determine Type of Window
methods.ppx

Methods for Multidimensional Space-Time Point Patterns
midpoints.psp

Midpoints of Line Segment Pattern
nestsplit

Nested Split
fourierbasis

Fourier Basis Functions
dilation

Morphological Dilation
harmoniseLevels

Harmonise the levels of several factors, or factor-valued pixel images.
matchingdist

Distance for a Point Pattern Matching
hyperframe

Hyper Data Frame
quadratcount

Quadrat counting for a point pattern
has.close

Check Whether Points Have Close Neighbours
plot.onearrow

Plot an Arrow
layerplotargs

Extract or Replace the Plot Arguments of a Layered Object
imcov

Spatial Covariance of a Pixel Image
dirichlet

Dirichlet Tessellation of Point Pattern
discpartarea

Area of Part of Disc
markstat

Summarise Marks in Every Neighbourhood in a Point Pattern
duplicated.ppp

Determine Duplicated Points in a Spatial Point Pattern
discretise

Safely Convert Point Pattern Window to Binary Mask
plot.listof

Plot a List of Things
pixellate.owin

Convert Window to Pixel Image
psp2mask

Convert Line Segment Pattern to Binary Pixel Mask
plot.owin

Plot a Spatial Window
nnmap

K-th Nearest Point Map
identify.ppp

Identify Points in a Point Pattern
plot.colourmap

Plot a Colour Map
nnwhich.pp3

Nearest neighbours in three dimensions
distmap.ppp

Distance Map of Point Pattern
erosion

Morphological Erosion by a Disc
grow.boxx

Add margins to box in any dimension
nvertices

Count Number of Vertices
layout.boxes

Generate a Row or Column Arrangement of Rectangles.
erosionAny

Morphological Erosion of Windows
methods.funxy

Methods for Spatial Functions
interp.im

Interpolate a Pixel Image
gridweights

Compute Quadrature Weights Based on Grid Counts
methods.layered

Methods for Layered Objects
perimeter

Perimeter Length of Window
npoints

Number of Points in a Point Pattern
nncross.ppx

Nearest Neighbours Between Two Patterns in Any Dimensions
is.linnet

Test Whether An Object Is A Linear Network
incircle

Find Largest Circle Inside Window
opening

Morphological Opening
ppp

Create a Point Pattern
nndist

Nearest neighbour distances
distmap.psp

Distance Map of Line Segment Pattern
print.psp

Print Brief Details of a Line Segment Pattern Dataset
is.empty

Test Whether An Object Is Empty
plot.solist

Plot a List of Spatial Objects
is.boxx

Recognise a Multi-Dimensional Box
shift.ppp

Apply Vector Translation To Point Pattern
with.hyperframe

Evaluate an Expression in Each Row of a Hyperframe
print.ppp

Print Brief Details of a Point Pattern Dataset
is.connected

Determine Whether an Object is Connected
pairdist.ppp

Pairwise distances
rescale.im

Convert Pixel Image to Another Unit of Length
headtail

First or Last Part of a Spatial Pattern
is.im

Test Whether An Object Is A Pixel Image
lut

Lookup Tables
quadscheme

Generate a Quadrature Scheme from a Point Pattern
rsyst

Simulate systematic random point pattern
hextess

Hexagonal Grid or Tessellation
infline

Infinite Straight Lines
inside.owin

Test Whether Points Are Inside A Window
im.apply

Apply Function Pixelwise to List of Images
rev.colourmap

Reverse the Colours in a Colour Map
nnmark

Mark of Nearest Neighbour
ppp.object

Class of Point Patterns
rjitter

Random Perturbation of a Point Pattern
plot.im

Plot a Pixel Image
pppdist

Distance Between Two Point Patterns
rQuasi

Generate Quasirandom Point Pattern in Given Window
quantile.im

Sample Quantiles of Pixel Image
nncross

Nearest Neighbours Between Two Patterns
print.im

Print Brief Details of an Image
padimage

Pad the Border of a Pixel Image
integral.im

Integral of a Pixel Image
sidelengths.owin

Side Lengths of Enclosing Rectangle of a Window
runifrect

Generate N Uniform Random Points in a Rectangle
im.object

Class of Images
plot.psp

plot a Spatial Line Segment Pattern
plot.texturemap

Plot a Texture Map
marks.psp

Marks of a Line Segment Pattern
plot.yardstick

Plot a Yardstick or Scale Bar
owin

Create a Window
nobjects

Count Number of Geometrical Objects in a Spatial Dataset
inside.boxx

Test Whether Points Are Inside A Multidimensional Box
raster.x

Cartesian Coordinates for a Pixel Raster
rotate

Rotate
rescale

Convert dataset to another unit of length
is.lpp

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

Quantile Tessellation
scalardilate

Apply Scalar Dilation
split.ppx

Divide Multidimensional Point Pattern into Sub-patterns
run.simplepanel

Run Point-and-Click Interface
is.linim

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

Convert Window Back To Rectangle
summary.ppp

Summary of a Point Pattern Dataset
is.multitype.ppp

Test Whether A Point Pattern is Multitype
methods.boxx

Methods for Multi-Dimensional Box
where.max

Find Location of Maximum in a Pixel Image
marks

Marks of a Point Pattern
nnwhich

Nearest neighbour
is.marked

Test Whether Marks Are Present
periodify

Make Periodic Copies of a Spatial Pattern
intersect.boxx

Intersection Of Boxes Of Arbitrary Dimension
pixellate

Convert Spatial Object to Pixel Image
rectdistmap

Distance Map Using Rectangular Distance Metric
is.owin

Test Whether An Object Is A Window
multiplicity.ppp

Count Multiplicity of Duplicate Points
project2set

Find Nearest Point in a Region
restrict.colourmap

Restrict a Colour Map to a Subset of Values
solist

List of Two-Dimensional Spatial Objects
nsegments

Number of Line Segments in a Line Segment Pattern
shift.im

Apply Vector Translation To Pixel Image
marks.tess

Marks of a Tessellation
rlinegrid

Generate grid of parallel lines with random displacement
nncross.pp3

Nearest Neighbours Between Two Patterns in 3D
pairdist

Pairwise distances
summary.quad

Summarizing a Quadrature Scheme
subset.psp

Subset of Line Segment Satisfying A Condition
uniquemap.ppp

Map Duplicate Entries to Unique Entries
test.crossing.psp

Check Whether Segments Cross
scanpp

Read Point Pattern From Data File
plot.hyperframe

Plot Entries in a Hyperframe
unique.ppp

Extract Unique Points from a Spatial Point Pattern
spokes

Spokes pattern of dummy points
rexplode

Explode a Point Pattern by Displacing Duplicated Points
polartess

Tessellation Using Polar Coordinates
whichhalfplane

Test Which Side of Infinite Line a Point Falls On
solutionset

Evaluate Logical Expression Involving Pixel Images and Return Region Where Expression is True
update.symbolmap

Update a Graphics Symbol Map.
textureplot

Plot Image or Tessellation Using Texture Fill
split.ppp

Divide Point Pattern into Sub-patterns
plot.quad

Plot a Spatial Quadrature Scheme
summary.psp

Summary of a Line Segment Pattern Dataset
quantilefun.im

Quantile Function for Images
summary.splitppp

Summary of a Split Point Pattern
pixelquad

Quadrature Scheme Based on Pixel Grid
summary.anylist

Summary of a List of Things
plot.pp3

Plot a Three-Dimensional Point Pattern
texturemap

Texture Map
pppmatching.object

Class of Point Matchings
union.quad

Union of Data and Dummy Points
pairdist.default

Pairwise distances
owin.object

Class owin
tweak.colourmap

Change Colour Values in a Colour Map
pixelcentres

Extract Pixel Centres as Point Pattern
perspPoints

Draw Points or Lines on a Surface Viewed in Perspective
plot.ppp

plot a Spatial Point Pattern
lengths_psp

Lengths of Line Segments
regularpolygon

Create A Regular Polygon
selfcrossing.psp

Crossing Points in a Line Segment Pattern
pp3

Three Dimensional Point Pattern
progressreport

Print Progress Reports
square

Square Window
levelset

Level Set of a Pixel Image
superimpose

Superimpose Several Geometric Patterns
subset.hyperframe

Subset of Hyperframe Satisfying A Condition
timed

Record the Computation Time
yardstick

Text, Arrow or Scale Bar in a Diagram
pointsOnLines

Place Points Evenly Along Specified Lines
venn.tess

Tessellation Delimited by Several Sets
rescale.owin

Convert Window to Another Unit of Length
transmat

Convert Pixel Array Between Different Conventions
plot.quadratcount

Plot Quadrat Counts
spatdim

Spatial Dimension of a Dataset
ripras

Estimate window from points alone
psp.object

Class of Line Segment Patterns
pppmatching

Create a Point Matching
print.owin

Print Brief Details of a Spatial Window
ppx

Multidimensional Space-Time Point Pattern
spatstat.geom-deprecated

Deprecated spatstat.geom functions
psp

Create a Line Segment Pattern
rotate.ppp

Rotate a Point Pattern
project2segment

Move Point To Nearest Line
print.quad

Print a Quadrature Scheme
reflect

Reflect In Origin
rotate.owin

Rotate a Window
rotate.infline

Rotate or Shift Infinite Lines
simplify.owin

Approximate a Polygon by a Simpler Polygon
quadscheme.logi

Generate a Logistic Regression Quadrature Scheme from a Point Pattern
vertices

Vertices of a Window
tile.areas

Compute Areas of Tiles in a Tessellation
zapsmall.im

Rounding of Pixel Values
subset.ppp

Subset of Point Pattern Satisfying A Condition
rotate.psp

Rotate a Line Segment Pattern
shift.ppx

Apply Vector Translation To Box Or Point Pattern In Arbitrary Dimension
shift.owin

Apply Vector Translation To Window
methods.distfun

Geometrical Operations for Distance Functions
nndist.pp3

Nearest neighbour distances in three dimensions
shift.psp

Apply Vector Translation To Line Segment Pattern
quasirandom

Quasirandom Patterns
solapply

Apply a Function Over a List and Obtain a List of Objects
relevel.im

Reorder Levels of a Factor-Valued Image or Pattern
stratrand

Stratified random point pattern
simplepanel

Simple Point-and-Click Interface Panels
scaletointerval

Rescale Data to Lie Between Specified Limits
nndist.ppx

Nearest Neighbour Distances in Any Dimensions
spatstat.geom-internal

Internal spatstat.geom functions
nnwhich.ppx

Nearest Neighbours in Any Dimensions
selfcut.psp

Cut Line Segments Where They Intersect
symbolmap

Graphics Symbol Map
summary.owin

Summary of a Spatial Window
plot.symbolmap

Plot a Graphics Symbol Map
tess

Create a Tessellation
text.ppp

Add Text Labels to Spatial Pattern
volume

Volume of an Object
tileindex

Determine Which Tile Contains Each Given Point
trim.rectangle

Cut margins from rectangle
summary.solist

Summary of a List of Spatial Objects
unmark

Remove Marks
triangulate.owin

Decompose Window into Triangles
unitname

Name for Unit of Length
owin2mask

Convert Window to Binary Mask under Constraints
plot.pppmatching

Plot a Point Matching
persp.im

Perspective Plot of Pixel Image
persp.ppp

Perspective Plot of Marked Point Pattern
round.ppp

Apply Numerical Rounding to Spatial Coordinates
plot.imlist

Plot a List of Images
tiles.empty

Check For Empty Tiles in a Tessellation
plot.tess

Plot a Tessellation
tilenames

Names of Tiles in a Tessellation
rounding.ppp

Detect Numerical Rounding
sessionLibs

Print Names and Version Numbers of Libraries Loaded
quad.object

Class of Quadrature Schemes
rescale.ppp

Convert Point Pattern to Another Unit of Length
timeTaken

Extract the Total Computation Time
rgbim

Create Colour-Valued Pixel Image
rescale.psp

Convert Line Segment Pattern to Another Unit of Length
summary.distfun

Summarizing a Function of Spatial Location
setcov

Set Covariance of a Window
spatstat.geom-package

The spatstat.geom Package
split.hyperframe

Divide Hyperframe Into Subsets and Reassemble
unstack.ppp

Separate Multiple Columns of Marks
spatstat.options

Internal Options in Spatstat Package
summary.im

Summarizing a Pixel Image
tiles

Extract List of Tiles in a Tessellation
unstack.solist

Unstack Each Spatial Object in a List of Objects