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

spatstat.geom (version 3.2-8)

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

51,396

Version

3.2-8

License

GPL (>= 2)

Maintainer

Last Published

January 26th, 2024

Functions in spatstat.geom (3.2-8)

Extract.owin

Extract Subset of Window
Extract.quad

Subset of Quadrature Scheme
Extract.listof

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

Extract or Replace Subset of Point Pattern
Extract.hyperframe

Extract or Replace Subset of Hyperframe
Extract.im

Extract Subset of Image
Extract.ppx

Extract Subset of Multidimensional Point Pattern
Extract.psp

Extract Subset of Line Segment Pattern
Extract.layered

Extract or Replace Subset of a Layered Object
Extract.anylist

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

Extract or Replace Sub-Patterns
Extract.tess

Extract or Replace Subset of Tessellation
Extract.solist

Extract or Replace Subset of a List of Spatial Objects
Window

Extract or Change the Window of a Spatial Object
Window.tess

Extract Window of Spatial Object
Replace.im

Reset Values in Subset of Image
MinkowskiSum

Minkowski Sum of Windows
Frame

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

S3 Group Generic methods for images
Math.imlist

S3 Group Generic methods for List of Images
add.texture

Fill Plot With Texture
anyNA.im

Check Whether Image Contains NA Values
affine.owin

Apply Affine Transformation To Window
affine.im

Apply Affine Transformation To Pixel Image
affine

Apply Affine Transformation
anylist

List of Objects
affine.ppp

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

Coerce Hyperframe to Data Frame
area.owin

Area of a Window
areaGain

Difference of Disc Areas
affine.tess

Apply Geometrical Transformation To Tessellation
as.data.frame.im

Convert Pixel Image to Data Frame
affine.psp

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

Convert a Tessellation to a Function
as.boxx

Convert Data to Multi-Dimensional Box
as.owin

Convert Data To Class owin
as.polygonal

Convert a Window to a Polygonal Window
as.colourmap

Convert to Colour Map
as.data.frame.psp

Coerce Line Segment Pattern to a Data Frame
append.psp

Combine Two Line Segment Patterns
as.tess

Convert Data To Tessellation
applynbd

Apply Function to Every Neighbourhood in a Point Pattern
bdist.pixels

Distance to Boundary of Window
as.hyperframe.ppx

Extract coordinates and marks of multidimensional point pattern
chop.tess

Subdivide a Window or Tessellation using a Set of Lines
as.im

Convert to Pixel Image
clickbox

Interactively Define a Rectangle
as.hyperframe

Convert Data to Hyperframe
angles.psp

Orientation Angles of Line Segments
as.function.im

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

Convert Window to Indicator Function
areaLoss

Difference of Disc Areas
as.matrix.im

Convert Pixel Image to Matrix or Array
as.matrix.owin

Convert Pixel Image to Matrix
as.box3

Convert Data to Three-Dimensional Box
as.rectangle

Window Frame
bdist.points

Distance to Boundary of Window
closepairs

Close Pairs of Points
as.data.frame.tess

Convert Tessellation to Data Frame
as.data.frame.owin

Convert Window to Data Frame
bounding.box.xy

Convex Hull of Points
as.data.frame.ppp

Coerce Point Pattern to a Data Frame
bdist.tiles

Distance to Boundary of Window
as.ppp

Convert Data To Class ppp
as.layered

Convert Data To Layered Object
closepairs.pp3

Close Pairs of Points in 3 Dimensions
by.im

Apply Function to Image Broken Down by Factor
as.psp

Convert Data To Class psp
contour.imlist

Array of Contour Plots
as.mask

Pixel Image Approximation of a Window
convexhull

Convex Hull
boundingcircle

Smallest Enclosing Circle
by.ppp

Apply a Function to a Point Pattern Broken Down by Factor
covering

Cover Region with Discs
as.solist

Convert List of Two-Dimensional Spatial Objects
box3

Three-Dimensional Box
boundingbox

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

Interactively Measure Distance
crossdist

Pairwise distances
closetriples

Close Triples of Points
closing

Morphological Closing
beachcolours

Create Colour Scheme for a Range of Numbers
connected

Connected components
border

Border Region of a Window
colourtools

Convert and Compare Colours in Different Formats
clickpoly

Interactively Define a Polygon
cbind.hyperframe

Combine Hyperframes by Rows or by Columns
centroid.owin

Centroid of a window
complement.owin

Take Complement of a Window
clickppp

Interactively Add Points
connected.ppp

Connected Components of a Point Pattern
delaunayDistance

Distance on Delaunay Triangulation
commonGrid

Determine A Common Spatial Domain And Pixel Resolution
boxx

Multi-Dimensional Box
concatxy

Concatenate x,y Coordinate Vectors
crossdist.default

Pairwise distances between two different sets of points
clip.infline

Intersect Infinite Straight Lines with a Window
convexhull.xy

Convex Hull of Points
bufftess

Buffer Distance Tessellation
crossdist.pp3

Pairwise distances between two different three-dimensional point patterns
deltametric

Delta Metric
connected.tess

Connected Components of Tiles of a Tessellation
default.dummy

Generate a Default Pattern of Dummy Points
diameter.boxx

Geometrical Calculations for Multi-Dimensional Box
delaunay

Delaunay Triangulation of Point Pattern
diameter.owin

Diameter of a Window
colourmap

Colour Lookup Tables
diameter

Diameter of an Object
colouroutputs

Extract or Assign Colour Values in a Colour Map
convexmetric

Distance Metric Defined by Convex Set
diameter.box3

Geometrical Calculations for Three-Dimensional Box
convolve.im

Convolution of Pixel Images
contour.im

Contour plot of pixel image
compatible

Test Whether Objects Are Compatible
compatible.im

Test Whether Pixel Images Are Compatible
crossdist.psp

Pairwise distances between two different line segment patterns
crossing.psp

Crossing Points of Two Line Segment Patterns
cut.im

Convert Pixel Image from Numeric to Factor
convexify

Weil's Convexifying Operation
cut.ppp

Classify Points in a Point Pattern
dirichlet

Dirichlet Tessellation of Point Pattern
distfun

Distance Map as a Function
dirichletAreas

Compute Areas of Tiles in Dirichlet Tessellation
coords

Extract or Change Coordinates of a Spatial or Spatiotemporal Point Pattern
dilated.areas

Areas of Morphological Dilations
disc

Circular Window
distmap

Distance Map
dilation

Morphological Dilation
discretise

Safely Convert Point Pattern Window to Binary Mask
discs

Union of Discs
corners

Corners of a rectangle
distmap.psp

Distance Map of Line Segment Pattern
dirichletVertices

Vertices and Edges of Dirichlet Tessellation
discpartarea

Area of Part of Disc
dirichletWeights

Compute Quadrature Weights Based on Dirichlet Tessellation
domain

Extract the Domain of any Spatial Object
crossdist.ppp

Pairwise distances between two different point patterns
crossdist.ppx

Pairwise Distances Between Two Different Multi-Dimensional Point Patterns
distmap.owin

Distance Map of Window
edit.hyperframe

Invoke Text Editor on Hyperframe
distmap.ppp

Distance Map of Point Pattern
eroded.areas

Areas of Morphological Erosions
erosion

Morphological Erosion by a Disc
edges2triangles

List Triangles in a Graph
edges2vees

List Dihedral Triples in a Graph
fourierbasis

Fourier Basis Functions
framedist.pixels

Distance to Bounding Frame
duplicated.ppp

Determine Duplicated Points in a Spatial Point Pattern
edit.ppp

Invoke Text Editor on Spatial Data
erosionAny

Morphological Erosion of Windows
fardist

Farthest Distance to Boundary of Window
edges

Extract Boundary Edges of a Window.
eval.im

Evaluate Expression Involving Pixel Images
flipxy

Exchange X and Y Coordinates
funxy

Spatial Function Class
harmonise.im

Make Pixel Images Compatible
gridweights

Compute Quadrature Weights Based on Grid Counts
gridcentres

Rectangular grid of points
grow.boxx

Add margins to box in any dimension
harmonise.owin

Make Windows Compatible
headtail

First or Last Part of a Spatial Pattern
hist.funxy

Histogram of Values of a Spatial Function
im.object

Class of Images
hist.im

Histogram of Pixel Values in an Image
hextess

Hexagonal Grid or Tessellation
ellipse

Elliptical Window.
imcov

Spatial Covariance of a Pixel Image
inside.boxx

Test Whether Points Are Inside A Multidimensional Box
harmoniseLevels

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

Add margins to rectangle
harmonise

Make Objects Compatible
endpoints.psp

Endpoints of Line Segment Pattern
hotrod

Heat Kernel for a One-Dimensional Rod
has.close

Check Whether Points Have Close Neighbours
intersect.boxx

Intersection Of Boxes Of Arbitrary Dimension
inside.owin

Test Whether Points Are Inside A Window
ewcdf

Weighted Empirical Cumulative Distribution Function
intersect.owin

Intersection, Union or Set Subtraction of Windows
incircle

Find Largest Circle Inside Window
identify.ppp

Identify Points in a Point Pattern
identify.psp

Identify Segments in a Line Segment Pattern
hyperframe

Hyper Data Frame
infline

Infinite Straight Lines
integral.im

Integral of a Pixel Image
intensity

Intensity of a Dataset or a Model
intensity.ppp

Empirical Intensity of Point Pattern
intensity.ppx

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

Extrapolate Line Segments to Obtain Infinite Lines
layout.boxes

Generate a Row or Column Arrangement of Rectangles.
intensity.psp

Empirical Intensity of Line Segment Pattern
im

Create a Pixel Image Object
intensity.quadratcount

Intensity Estimates Using Quadrat Counts
interp.colourmap

Interpolate smoothly between specified colours
intersect.tess

Intersection of Two Tessellations
interp.im

Interpolate a Pixel Image
invoke.symbolmap

Plot Data Using Graphics Symbol Map
is.im

Test Whether An Object Is A Pixel Image
is.boxx

Recognise a Multi-Dimensional Box
lengths_psp

Lengths of Line Segments
is.linim

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

Apply Function Pixelwise to List of Images
is.owin

Test Whether An Object Is A Window
invoke.metric

Perform Geometric Task using a Specified Metric
is.ppp

Test Whether An Object Is A Point Pattern
integral

Integral of a Function or Spatial Object
integral.density

Compute Integral of One-Dimensional Kernel Density Estimate.
is.convex

Test Whether a Window is Convex
is.empty

Test Whether An Object Is Empty
marks.tess

Marks of a Tessellation
is.multitype

Test whether Object is Multitype
is.multitype.ppp

Test Whether A Point Pattern is Multitype
levelset

Level Set of a Pixel Image
markstat

Summarise Marks in Every Neighbourhood in a Point Pattern
is.marked

Test Whether Marks Are Present
lut

Lookup Tables
methods.pp3

Methods for three-dimensional point patterns
is.linnet

Test Whether An Object Is A Linear Network
is.lpp

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

Determine Whether an Object is Connected
is.marked.ppp

Test Whether A Point Pattern is Marked
layered

Create List of Plotting Layers
marks

Marks of a Point Pattern
is.connected.ppp

Determine Whether a Point Pattern is Connected
layerplotargs

Extract or Replace the Plot Arguments of a Layered Object
marks.psp

Marks of a Line Segment Pattern
is.rectangle

Determine Type of Window
methods.ppx

Methods for Multidimensional Space-Time Point Patterns
is.subset.owin

Determine Whether One Window is Contained In Another
nncross.ppx

Nearest Neighbours Between Two Patterns in Any Dimensions
nndist

Nearest neighbour distances
matchingdist

Distance for a Point Pattern Matching
mergeLevels

Merge Levels of a Factor
methods.funxy

Methods for Spatial Functions
methods.layered

Methods for Layered Objects
mean.ewcdf

Mean of Empirical Cumulative Distribution Function
maxnndist

Compute Minimum or Maximum Nearest-Neighbour Distance
nearest.raster.point

Find Pixel Nearest to a Given Point
methods.boxx

Methods for Multi-Dimensional Box
nearestValue

Image of Nearest Defined Pixel Value
methods.box3

Methods for Three-Dimensional Box
nnmap

K-th Nearest Point Map
nnmark

Mark of Nearest Neighbour
mean.im

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

Geometrical Operations for Distance Functions
nnwhich

Nearest neighbour
owin.object

Class owin
persp.im

Perspective Plot of Pixel Image
nncross

Nearest Neighbours Between Two Patterns
perspPoints

Draw Points or Lines on a Surface Viewed in Perspective
nnwhich.pp3

Nearest neighbours in three dimensions
methods.unitname

Methods for Units
owin2mask

Convert Window to Binary Mask under Constraints
metric.object

Distance Metric
overlap.owin

Compute Area of Overlap
nearestsegment

Find Line Segment Nearest to Each Point
pairdist.pp3

Pairwise distances in Three Dimensions
nncross.pp3

Nearest Neighbours Between Two Patterns in 3D
pairdist.ppp

Pairwise distances
midpoints.psp

Midpoints of Line Segment Pattern
nnwhich.ppx

Nearest Neighbours in Any Dimensions
multiplicity.ppp

Count Multiplicity of Duplicate Points
nestsplit

Nested Split
nobjects

Count Number of Geometrical Objects in a Spatial Dataset
nndist.pp3

Nearest neighbour distances in three dimensions
owin

Create a Window
pHcolourmap

Colour Map for pH Values
nndist.ppx

Nearest Neighbour Distances in Any Dimensions
nvertices

Count Number of Vertices
opening

Morphological Opening
pixelcentres

Extract Pixel Centres as Point Pattern
padimage

Pad the Border of a Pixel Image
plot.hyperframe

Plot Entries in a Hyperframe
pairdist

Pairwise distances
plot.im

Plot a Pixel Image
pairdist.ppx

Pairwise Distances in Any Dimensions
pairdist.psp

Pairwise distances between line segments
perimeter

Perimeter Length of Window
pairdist.default

Pairwise distances
pixellate

Convert Spatial Object to Pixel Image
periodify

Make Periodic Copies of a Spatial Pattern
nndist.psp

Nearest neighbour distances between line segments
pixellate.psp

Convert Line Segment Pattern to Pixel Image
pixelquad

Quadrature Scheme Based on Pixel Grid
nnfun

Nearest Neighbour Index Map as a Function
plot.imlist

Plot a List of Images
plot.layered

Layered Plot
plot.anylist

Plot a List of Things
plot.colourmap

Plot a Colour Map
npoints

Number of Points in a Point Pattern
plot.owin

Plot a Spatial Window
plot.psp

plot a Spatial Line Segment Pattern
plot.quad

Plot a Spatial Quadrature Scheme
pointsOnLines

Place Points Evenly Along Specified Lines
plot.texturemap

Plot a Texture Map
polartess

Tessellation Using Polar Coordinates
plot.yardstick

Plot a Yardstick or Scale Bar
nsegments

Number of Line Segments in a Line Segment Pattern
ppx

Multidimensional Space-Time Point Pattern
ppp.object

Class of Point Patterns
pppdist

Distance Between Two Point Patterns
plot.pp3

Plot a Three-Dimensional Point Pattern
plot.listof

Plot a List of Things
plot.onearrow

Plot an Arrow
regularpolygon

Create A Regular Polygon
print.im

Print Brief Details of an Image
quantile.ewcdf

Quantiles of Weighted Empirical Cumulative Distribution Function
psp.object

Class of Line Segment Patterns
psp2mask

Convert Line Segment Pattern to Binary Pixel Mask
plot.symbolmap

Plot a Graphics Symbol Map
rotate.psp

Rotate a Line Segment Pattern
plot.quadratcount

Plot Quadrat Counts
plot.solist

Plot a List of Spatial Objects
pixellate.owin

Convert Window to Pixel Image
quad.object

Class of Quadrature Schemes
pixellate.ppp

Convert Point Pattern to Pixel Image
shift

Apply Vector Translation
rotate.im

Rotate a Pixel Image
quantile.im

Sample Quantiles of Pixel Image
rgbim

Create Colour-Valued Pixel Image
project2set

Find Nearest Point in a Region
rescale.im

Convert Pixel Image to Another Unit of Length
psp

Create a Line Segment Pattern
plot.ppp

plot a Spatial Point Pattern
pp3

Three Dimensional Point Pattern
reflect

Reflect In Origin
rotate.owin

Rotate a Window
ppp

Create a Point Pattern
plot.splitppp

Plot a List of Point Patterns
quadrats

Divide Region into Quadrats
plot.pppmatching

Plot a Point Matching
quadscheme

Generate a Quadrature Scheme from a Point Pattern
spatdim

Spatial Dimension of a Dataset
unmark

Remove Marks
rotate

Rotate
print.owin

Print Brief Details of a Spatial Window
tess

Create a Tessellation
plot.tess

Plot a Tessellation
ripras

Estimate window from points alone
print.psp

Print Brief Details of a Line Segment Pattern Dataset
rQuasi

Generate Quasirandom Point Pattern in Given Window
summary.owin

Summary of a Spatial Window
yardstick

Text, Arrow or Scale Bar in a Diagram
print.quad

Print a Quadrature Scheme
plot.textstring

Plot a Text String
restrict.colourmap

Restrict a Colour Map to a Subset of Values
pppmatching.object

Class of Point Matchings
progressreport

Print Progress Reports
pppmatching

Create a Point Matching
print.ppp

Print Brief Details of a Point Pattern Dataset
with.hyperframe

Evaluate an Expression in Each Row of a Hyperframe
quantilefun

Quantile Function
project2segment

Move Point To Nearest Line
quasirandom

Quasirandom Patterns
rescale

Convert dataset to another unit of length
shift.owin

Apply Vector Translation To Window
rotate.ppp

Rotate a Point Pattern
quantilefun.im

Quantile Function for Images
selfcrossing.psp

Crossing Points in a Line Segment Pattern
rounding

Detect Numerical Rounding
setcov

Set Covariance of a Window
quadscheme.logi

Generate a Logistic Regression Quadrature Scheme from a Point Pattern
rotate.infline

Rotate or Shift Infinite Lines
rescale.psp

Convert Line Segment Pattern to Another Unit of Length
where.max

Find Location of Maximum in a Pixel Image
quantess

Quantile Tessellation
summary.listof

Summary of a List of Things
shift.ppp

Apply Vector Translation To Point Pattern
run.simplepanel

Run Point-and-Click Interface
spatstat.geom-internal

Internal spatstat.geom functions
rescue.rectangle

Convert Window Back To Rectangle
split.ppx

Divide Multidimensional Point Pattern into Sub-patterns
sessionLibs

Print Names and Version Numbers of Libraries Loaded
rsyst

Simulate systematic random point pattern
scaletointerval

Rescale Data to Lie Between Specified Limits
quadratcount

Quadrat counting for a point pattern
rjitter

Random Perturbation of a Point Pattern
round.ppp

Apply Numerical Rounding to Spatial Coordinates
summary.quad

Summarizing a Quadrature Scheme
relevel.im

Reorder Levels of a Factor-Valued Image or Pattern
venn.tess

Tessellation Delimited by Several Sets
spatstat.geom-deprecated

Deprecated spatstat.geom functions
requireversion

Require a Specific Version of a Package
raster.x

Cartesian Coordinates for a Pixel Raster
scalardilate

Apply Scalar Dilation
rectdistmap

Distance Map Using Rectangular Distance Metric
runifrect

Generate N Uniform Random Points in a Rectangle
texturemap

Texture Map
solist

List of Two-Dimensional Spatial Objects
rescale.ppp

Convert Point Pattern to Another Unit of Length
subset.hyperframe

Subset of Hyperframe Satisfying A Condition
rexplode

Explode a Point Pattern by Displacing Duplicated Points
solutionset

Evaluate Logical Expression Involving Pixel Images and Return Region Where Expression is True
zapsmall.im

Rounding of Pixel Values
spatstat.options

Internal Options in Spatstat Package
summary.anylist

Summary of a List of Things
rescale.owin

Convert Window to Another Unit of Length
summary.solist

Summary of a List of Spatial Objects
sidelengths.owin

Side Lengths of Enclosing Rectangle of a Window
rlinegrid

Generate grid of parallel lines with random displacement
simplify.owin

Approximate a Polygon by a Simpler Polygon
tile.areas

Compute Areas of Tiles in a Tessellation
uniquemap.ppp

Map Duplicate Entries to Unique Entries
spatstat.geom-package

The spatstat.geom Package
unitname

Name for Unit of Length
subset.psp

Subset of Line Segment Satisfying A Condition
split.hyperframe

Divide Hyperframe Into Subsets and Reassemble
selfcut.psp

Cut Line Segments Where They Intersect
square

Square Window
stratrand

Stratified random point pattern
scanpp

Read Point Pattern From Data File
test.crossing.psp

Check Whether Segments Cross
textureplot

Plot Image or Tessellation Using Texture Fill
text.ppp

Add Text Labels to Spatial Pattern
tilenames

Names of Tiles in a Tessellation
tiles

Extract List of Tiles in a Tessellation
shift.psp

Apply Vector Translation To Line Segment Pattern
split.im

Divide Image Into Sub-images
subset.ppp

Subset of Point Pattern Satisfying A Condition
simplepanel

Simple Point-and-Click Interface Panels
solapply

Apply a Function Over a List and Obtain a List of Objects
union.quad

Union of Data and Dummy Points
shift.ppx

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

Apply Vector Translation To Pixel Image
split.ppp

Divide Point Pattern into Sub-patterns
summary.distfun

Summarizing a Function of Spatial Location
summary.im

Summarizing a Pixel Image
unstack.solist

Unstack Each Spatial Object in a List of Objects
tiles.empty

Check For Empty Tiles in a Tessellation
symbolmap

Graphics Symbol Map
summary.ppp

Summary of a Point Pattern Dataset
summary.splitppp

Summary of a Split Point Pattern
whichhalfplane

Test Which Side of Infinite Line a Point Falls On
transformquantiles

Transform the Quantiles
superimpose

Superimpose Several Geometric Patterns
transmat

Convert Pixel Array Between Different Conventions
spokes

Spokes pattern of dummy points
summary.psp

Summary of a Line Segment Pattern Dataset
uniquemap.default

Map Duplicate Entries to Unique Entries
unique.ppp

Extract Unique Points from a Spatial Point Pattern
tileindex

Determine Which Tile Contains Each Given Point
triangulate.owin

Decompose Window into Triangles
update.symbolmap

Update a Graphics Symbol Map.
vertices

Vertices of a Window
volume

Volume of an Object
timeTaken

Extract the Total Computation Time
weighted.median

Weighted Median, Quantiles or Variance
timed

Record the Computation Time
whist

Weighted Histogram
unnormdensity

Weighted kernel smoother
unstack.ppp

Separate Multiple Columns of Marks
trim.rectangle

Cut margins from rectangle
tweak.colourmap

Change Colour Values in a Colour Map