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

spatstat.geom (version 3.2-7)

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-7

License

GPL (>= 2)

Maintainer

Last Published

October 20th, 2023

Functions in spatstat.geom (3.2-7)

Extract.ppp

Extract or Replace Subset of Point Pattern
Extract.layered

Extract or Replace Subset of a Layered Object
Extract.psp

Extract Subset of Line Segment Pattern
Extract.quad

Subset of Quadrature Scheme
Extract.ppx

Extract Subset of Multidimensional Point Pattern
Extract.im

Extract Subset of Image
Extract.anylist

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

Extract Subset of Window
Extract.listof

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

Extract or Replace Subset of Hyperframe
MinkowskiSum

Minkowski Sum of Windows
Window.tess

Extract Window of Spatial Object
Frame

Extract or Change the Containing Rectangle of a Spatial Object
Extract.tess

Extract or Replace Subset of Tessellation
Window

Extract or Change the Window of a Spatial Object
Math.imlist

S3 Group Generic methods for List of Images
Math.im

S3 Group Generic methods for images
Extract.solist

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

Extract or Replace Sub-Patterns
Replace.im

Reset Values in Subset of Image
affine.ppp

Apply Affine Transformation To Point Pattern
affine

Apply Affine Transformation
add.texture

Fill Plot With Texture
affine.im

Apply Affine Transformation To Pixel Image
anyNA.im

Check Whether Image Contains NA Values
anylist

List of Objects
affine.owin

Apply Affine Transformation To Window
affine.tess

Apply Geometrical Transformation To Tessellation
angles.psp

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

Coerce Hyperframe to Data Frame
as.data.frame.im

Convert Pixel Image to Data Frame
affine.psp

Apply Affine Transformation To Line Segment Pattern
append.psp

Combine Two Line Segment Patterns
areaLoss

Difference of Disc Areas
as.boxx

Convert Data to Multi-Dimensional Box
as.box3

Convert Data to Three-Dimensional Box
as.colourmap

Convert to Colour Map
area.owin

Area of a Window
areaGain

Difference of Disc Areas
as.data.frame.owin

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

Coerce Line Segment Pattern to a Data Frame
applynbd

Apply Function to Every Neighbourhood in a Point Pattern
as.function.im

Convert Pixel Image to Function of Coordinates
as.hyperframe.ppx

Extract coordinates and marks of multidimensional point pattern
as.data.frame.ppp

Coerce Point Pattern to a Data Frame
as.layered

Convert Data To Layered Object
as.mask

Pixel Image Approximation of a Window
as.im

Convert to Pixel Image
as.function.tess

Convert a Tessellation to a Function
as.ppp

Convert Data To Class ppp
as.function.owin

Convert Window to Indicator Function
as.hyperframe

Convert Data to Hyperframe
as.matrix.im

Convert Pixel Image to Matrix or Array
boundingcircle

Smallest Enclosing Circle
as.psp

Convert Data To Class psp
bdist.points

Distance to Boundary of Window
bdist.tiles

Distance to Boundary of Window
as.matrix.owin

Convert Pixel Image to Matrix
as.owin

Convert Data To Class owin
chop.tess

Subdivide a Window or Tessellation using a Set of Lines
box3

Three-Dimensional Box
as.data.frame.tess

Convert Tessellation to Data Frame
as.polygonal

Convert a Window to a Polygonal Window
as.rectangle

Window Frame
as.solist

Convert List of Two-Dimensional Spatial Objects
beachcolours

Create Colour Scheme for a Range of Numbers
border

Border Region of a Window
connected

Connected components
clickdist

Interactively Measure Distance
clickbox

Interactively Define a Rectangle
connected.ppp

Connected Components of a Point Pattern
closepairs

Close Pairs of Points
boxx

Multi-Dimensional Box
convexhull.xy

Convex Hull of Points
bounding.box.xy

Convex Hull of Points
closepairs.pp3

Close Pairs of Points in 3 Dimensions
clickpoly

Interactively Define a Polygon
convexify

Weil's Convexifying Operation
as.tess

Convert Data To Tessellation
bdist.pixels

Distance to Boundary of Window
boundingbox

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

Close Triples of Points
by.im

Apply Function to Image Broken Down by Factor
closing

Morphological Closing
by.ppp

Apply a Function to a Point Pattern Broken Down by Factor
default.dummy

Generate a Default Pattern of Dummy Points
delaunay

Delaunay Triangulation of Point Pattern
compatible

Test Whether Objects Are Compatible
compatible.im

Test Whether Pixel Images Are Compatible
bufftess

Buffer Distance Tessellation
colourmap

Colour Lookup Tables
dirichletVertices

Vertices and Edges of Dirichlet Tessellation
colouroutputs

Extract or Assign Colour Values in a Colour Map
dirichletWeights

Compute Quadrature Weights Based on Dirichlet Tessellation
cbind.hyperframe

Combine Hyperframes by Rows or by Columns
distfun

Distance Map as a Function
contour.imlist

Array of Contour Plots
colourtools

Convert and Compare Colours in Different Formats
coords

Extract or Change Coordinates of a Spatial or Spatiotemporal Point Pattern
centroid.owin

Centroid of a window
corners

Corners of a rectangle
convexmetric

Distance Metric Defined by Convex Set
distmap.owin

Distance Map of Window
convexhull

Convex Hull
distmap.ppp

Distance Map of Point Pattern
fourierbasis

Fourier Basis Functions
commonGrid

Determine A Common Spatial Domain And Pixel Resolution
framedist.pixels

Distance to Bounding Frame
im.object

Class of Images
convolve.im

Convolution of Pixel Images
distmap

Distance Map
complement.owin

Take Complement of a Window
delaunayDistance

Distance on Delaunay Triangulation
imcov

Spatial Covariance of a Pixel Image
covering

Cover Region with Discs
edges2triangles

List Triangles in a Graph
crossdist

Pairwise distances
deltametric

Delta Metric
dilated.areas

Areas of Morphological Dilations
cut.im

Convert Pixel Image from Numeric to Factor
integral.im

Integral of a Pixel Image
dilation

Morphological Dilation
clickppp

Interactively Add Points
concatxy

Concatenate x,y Coordinate Vectors
cut.ppp

Classify Points in a Point Pattern
clip.infline

Intersect Infinite Straight Lines with a Window
diameter

Diameter of an Object
disc

Circular Window
edges2vees

List Dihedral Triples in a Graph
diameter.box3

Geometrical Calculations for Three-Dimensional Box
funxy

Spatial Function Class
distmap.psp

Distance Map of Line Segment Pattern
crossdist.default

Pairwise distances between two different sets of points
gridcentres

Rectangular grid of points
crossdist.pp3

Pairwise distances between two different three-dimensional point patterns
crossdist.psp

Pairwise distances between two different line segment patterns
connected.tess

Connected Components of Tiles of a Tessellation
contour.im

Contour plot of pixel image
grow.rectangle

Add margins to rectangle
discpartarea

Area of Part of Disc
crossing.psp

Crossing Points of Two Line Segment Patterns
harmonise

Make Objects Compatible
dirichlet

Dirichlet Tessellation of Point Pattern
inside.boxx

Test Whether Points Are Inside A Multidimensional Box
domain

Extract the Domain of any Spatial Object
inside.owin

Test Whether Points Are Inside A Window
duplicated.ppp

Determine Duplicated Points in a Spatial Point Pattern
dirichletAreas

Compute Areas of Tiles in Dirichlet Tessellation
edges

Extract Boundary Edges of a Window.
intersect.tess

Intersection of Two Tessellations
invoke.metric

Perform Geometric Task using a Specified Metric
crossdist.ppp

Pairwise distances between two different point patterns
intensity

Intensity of a Dataset or a Model
layered

Create List of Plotting Layers
is.linnet

Test Whether An Object Is A Linear Network
crossdist.ppx

Pairwise Distances Between Two Different Multi-Dimensional Point Patterns
layerplotargs

Extract or Replace the Plot Arguments of a Layered Object
discretise

Safely Convert Point Pattern Window to Binary Mask
eroded.areas

Areas of Morphological Erosions
erosion

Morphological Erosion by a Disc
erosionAny

Morphological Erosion of Windows
eval.im

Evaluate Expression Involving Pixel Images
methods.unitname

Methods for Units
headtail

First or Last Part of a Spatial Pattern
discs

Union of Discs
metric.object

Distance Metric
harmoniseLevels

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

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

Hexagonal Grid or Tessellation
im

Create a Pixel Image Object
has.close

Check Whether Points Have Close Neighbours
diameter.boxx

Geometrical Calculations for Multi-Dimensional Box
im.apply

Apply Function Pixelwise to List of Images
edit.hyperframe

Invoke Text Editor on Hyperframe
edit.ppp

Invoke Text Editor on Spatial Data
ewcdf

Weighted Empirical Cumulative Distribution Function
diameter.owin

Diameter of a Window
ellipse

Elliptical Window.
invoke.symbolmap

Plot Data Using Graphics Symbol Map
midpoints.psp

Midpoints of Line Segment Pattern
is.boxx

Recognise a Multi-Dimensional Box
multiplicity.ppp

Count Multiplicity of Duplicate Points
extrapolate.psp

Extrapolate Line Segments to Obtain Infinite Lines
hotrod

Heat Kernel for a One-Dimensional Rod
hyperframe

Hyper Data Frame
nndist.psp

Nearest neighbour distances between line segments
is.multitype

Test whether Object is Multitype
harmonise.im

Make Pixel Images Compatible
is.marked

Test Whether Marks Are Present
integral

Integral of a Function or Spatial Object
is.multitype.ppp

Test Whether A Point Pattern is Multitype
harmonise.owin

Make Windows Compatible
integral.density

Compute Integral of One-Dimensional Kernel Density Estimate.
is.marked.ppp

Test Whether A Point Pattern is Marked
marks

Marks of a Point Pattern
hist.funxy

Histogram of Values of a Spatial Function
is.owin

Test Whether An Object Is A Window
intersect.boxx

Intersection Of Boxes Of Arbitrary Dimension
hist.im

Histogram of Pixel Values in an Image
nnfun

Nearest Neighbour Index Map as a Function
marks.psp

Marks of a Line Segment Pattern
intersect.owin

Intersection, Union or Set Subtraction of Windows
methods.boxx

Methods for Multi-Dimensional Box
methods.distfun

Geometrical Operations for Distance Functions
endpoints.psp

Endpoints of Line Segment Pattern
is.ppp

Test Whether An Object Is A Point Pattern
fardist

Farthest Distance to Boundary of Window
mean.ewcdf

Mean of Empirical Cumulative Distribution Function
mean.im

Mean and Median of Pixel Values in an Image
incircle

Find Largest Circle Inside Window
is.im

Test Whether An Object Is A Pixel Image
flipxy

Exchange X and Y Coordinates
is.linim

Test Whether an Object is a Pixel Image on a Linear Network
infline

Infinite Straight Lines
gridweights

Compute Quadrature Weights Based on Grid Counts
is.rectangle

Determine Type of Window
is.subset.owin

Determine Whether One Window is Contained In Another
nearestsegment

Find Line Segment Nearest to Each Point
interp.colourmap

Interpolate smoothly between specified colours
interp.im

Interpolate a Pixel Image
nestsplit

Nested Split
nncross

Nearest Neighbours Between Two Patterns
nncross.pp3

Nearest Neighbours Between Two Patterns in 3D
grow.boxx

Add margins to box in any dimension
is.connected

Determine Whether an Object is Connected
is.connected.ppp

Determine Whether a Point Pattern is Connected
layout.boxes

Generate a Row or Column Arrangement of Rectangles.
matchingdist

Distance for a Point Pattern Matching
identify.ppp

Identify Points in a Point Pattern
identify.psp

Identify Segments in a Line Segment Pattern
intensity.ppp

Empirical Intensity of Point Pattern
nnwhich

Nearest neighbour
maxnndist

Compute Minimum or Maximum Nearest-Neighbour Distance
intensity.ppx

Intensity of a Multidimensional Space-Time Point Pattern
methods.funxy

Methods for Spatial Functions
methods.layered

Methods for Layered Objects
intensity.psp

Empirical Intensity of Line Segment Pattern
nnwhich.pp3

Nearest neighbours in three dimensions
intensity.quadratcount

Intensity Estimates Using Quadrat Counts
nearest.raster.point

Find Pixel Nearest to a Given Point
nearestValue

Image of Nearest Defined Pixel Value
pHcolourmap

Colour Map for pH Values
padimage

Pad the Border of a Pixel Image
pairdist.pp3

Pairwise distances in Three Dimensions
nndist.pp3

Nearest neighbour distances in three dimensions
is.convex

Test Whether a Window is Convex
nndist.ppx

Nearest Neighbour Distances in Any Dimensions
is.empty

Test Whether An Object Is Empty
nnmap

K-th Nearest Point Map
nnmark

Mark of Nearest Neighbour
levelset

Level Set of a Pixel Image
pairdist.ppp

Pairwise distances
overlap.owin

Compute Area of Overlap
lut

Lookup Tables
lengths_psp

Lengths of Line Segments
mergeLevels

Merge Levels of a Factor
owin

Create a Window
perimeter

Perimeter Length of Window
marks.tess

Marks of a Tessellation
methods.box3

Methods for Three-Dimensional Box
persp.im

Perspective Plot of Pixel Image
perspPoints

Draw Points or Lines on a Surface Viewed in Perspective
periodify

Make Periodic Copies of a Spatial Pattern
pixellate.psp

Convert Line Segment Pattern to Pixel Image
markstat

Summarise Marks in Every Neighbourhood in a Point Pattern
pixelquad

Quadrature Scheme Based on Pixel Grid
nncross.ppx

Nearest Neighbours Between Two Patterns in Any Dimensions
owin.object

Class owin
nndist

Nearest neighbour distances
owin2mask

Convert Window to Binary Mask under Constraints
pairdist.ppx

Pairwise Distances in Any Dimensions
pairdist.psp

Pairwise distances between line segments
methods.pp3

Methods for three-dimensional point patterns
pixellate.owin

Convert Window to Pixel Image
pixellate.ppp

Convert Point Pattern to Pixel Image
methods.ppx

Methods for Multidimensional Space-Time Point Patterns
nnwhich.ppx

Nearest Neighbours in Any Dimensions
nobjects

Count Number of Geometrical Objects in a Spatial Dataset
nvertices

Count Number of Vertices
opening

Morphological Opening
pp3

Three Dimensional Point Pattern
ppp

Create a Point Pattern
plot.psp

plot a Spatial Line Segment Pattern
plot.quad

Plot a Spatial Quadrature Scheme
psp.object

Class of Line Segment Patterns
psp2mask

Convert Line Segment Pattern to Binary Pixel Mask
plot.hyperframe

Plot Entries in a Hyperframe
quadscheme.logi

Generate a Logistic Regression Quadrature Scheme from a Point Pattern
plot.im

Plot a Pixel Image
quantess

Quantile Tessellation
plot.ppp

plot a Spatial Point Pattern
plot.pppmatching

Plot a Point Matching
plot.texturemap

Plot a Texture Map
plot.owin

Plot a Spatial Window
pixelcentres

Extract Pixel Centres as Point Pattern
npoints

Number of Points in a Point Pattern
nsegments

Number of Line Segments in a Line Segment Pattern
pairdist

Pairwise distances
plot.pp3

Plot a Three-Dimensional Point Pattern
pairdist.default

Pairwise distances
pixellate

Convert Spatial Object to Pixel Image
pointsOnLines

Place Points Evenly Along Specified Lines
polartess

Tessellation Using Polar Coordinates
plot.yardstick

Plot a Yardstick or Scale Bar
ppx

Multidimensional Space-Time Point Pattern
plot.splitppp

Plot a List of Point Patterns
print.im

Print Brief Details of an Image
plot.symbolmap

Plot a Graphics Symbol Map
regularpolygon

Create A Regular Polygon
plot.listof

Plot a List of Things
plot.onearrow

Plot an Arrow
plot.tess

Plot a Tessellation
relevel.im

Reorder Levels of a Factor-Valued Image or Pattern
plot.anylist

Plot a List of Things
print.owin

Print Brief Details of a Spatial Window
plot.textstring

Plot a Text String
print.ppp

Print Brief Details of a Point Pattern Dataset
quad.object

Class of Quadrature Schemes
rQuasi

Generate Quasirandom Point Pattern in Given Window
quadratcount

Quadrat counting for a point pattern
raster.x

Cartesian Coordinates for a Pixel Raster
psp

Create a Line Segment Pattern
project2set

Find Nearest Point in a Region
plot.colourmap

Plot a Colour Map
progressreport

Print Progress Reports
ripras

Estimate window from points alone
project2segment

Move Point To Nearest Line
quantilefun

Quantile Function
quasirandom

Quasirandom Patterns
plot.imlist

Plot a List of Images
plot.layered

Layered Plot
rjitter

Random Perturbation of a Point Pattern
rescale.im

Convert Pixel Image to Another Unit of Length
rexplode

Explode a Point Pattern by Displacing Duplicated Points
scanpp

Read Point Pattern From Data File
plot.quadratcount

Plot Quadrat Counts
plot.solist

Plot a List of Spatial Objects
ppp.object

Class of Point Patterns
rgbim

Create Colour-Valued Pixel Image
rounding

Detect Numerical Rounding
rsyst

Simulate systematic random point pattern
rlinegrid

Generate grid of parallel lines with random displacement
trim.rectangle

Cut margins from rectangle
pppdist

Distance Between Two Point Patterns
rotate.psp

Rotate a Line Segment Pattern
rescale.ppp

Convert Point Pattern to Another Unit of Length
shift.ppp

Apply Vector Translation To Point Pattern
rescale.psp

Convert Line Segment Pattern to Another Unit of Length
rescale.owin

Convert Window to Another Unit of Length
selfcrossing.psp

Crossing Points in a Line Segment Pattern
quantile.ewcdf

Quantiles of Weighted Empirical Cumulative Distribution Function
quantile.im

Sample Quantiles of Pixel Image
rotate.im

Rotate a Pixel Image
pppmatching

Create a Point Matching
yardstick

Text, Arrow or Scale Bar in a Diagram
round.ppp

Apply Numerical Rounding to Spatial Coordinates
shift.ppx

Apply Vector Translation To Box Or Point Pattern In Arbitrary Dimension
texturemap

Texture Map
requireversion

Require a Specific Version of a Package
pppmatching.object

Class of Point Matchings
scalardilate

Apply Scalar Dilation
rotate

Rotate
shift.im

Apply Vector Translation To Pixel Image
rescale

Convert dataset to another unit of length
scaletointerval

Rescale Data to Lie Between Specified Limits
setcov

Set Covariance of a Window
shift.owin

Apply Vector Translation To Window
rotate.infline

Rotate or Shift Infinite Lines
subset.ppp

Subset of Point Pattern Satisfying A Condition
split.ppp

Divide Point Pattern into Sub-patterns
spatstat.geom-internal

Internal spatstat.geom functions
print.psp

Print Brief Details of a Line Segment Pattern Dataset
tileindex

Determine Which Tile Contains Each Given Point
print.quad

Print a Quadrature Scheme
rescue.rectangle

Convert Window Back To Rectangle
runifrect

Generate N Uniform Random Points in a Rectangle
square

Square Window
run.simplepanel

Run Point-and-Click Interface
restrict.colourmap

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

Rotate a Window
text.ppp

Add Text Labels to Spatial Pattern
selfcut.psp

Cut Line Segments Where They Intersect
shift

Apply Vector Translation
quadrats

Divide Region into Quadrats
quadscheme

Generate a Quadrature Scheme from a Point Pattern
rotate.ppp

Rotate a Point Pattern
solapply

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

List of Two-Dimensional Spatial Objects
summary.listof

Summary of a List of Things
spatstat.geom-package

The spatstat.geom Package
simplepanel

Simple Point-and-Click Interface Panels
reflect

Reflect In Origin
sessionLibs

Print Names and Version Numbers of Libraries Loaded
shift.psp

Apply Vector Translation To Line Segment Pattern
spatstat.options

Internal Options in Spatstat Package
simplify.owin

Approximate a Polygon by a Simpler Polygon
split.ppx

Divide Multidimensional Point Pattern into Sub-patterns
sidelengths.owin

Side Lengths of Enclosing Rectangle of a Window
textureplot

Plot Image or Tessellation Using Texture Fill
subset.psp

Subset of Line Segment Satisfying A Condition
unstack.solist

Unstack Each Spatial Object in a List of Objects
with.hyperframe

Evaluate an Expression in Each Row of a Hyperframe
uniquemap.default

Map Duplicate Entries to Unique Entries
spatstat.geom-deprecated

Deprecated spatstat.geom functions
rectdistmap

Distance Map Using Rectangular Distance Metric
unique.ppp

Extract Unique Points from a Spatial Point Pattern
tess

Create a Tessellation
summary.im

Summarizing a Pixel Image
unmark

Remove Marks
whist

Weighted Histogram
summary.psp

Summary of a Line Segment Pattern Dataset
spokes

Spokes pattern of dummy points
tilenames

Names of Tiles in a Tessellation
summary.solist

Summary of a List of Spatial Objects
unnormdensity

Weighted kernel smoother
superimpose

Superimpose Several Geometric Patterns
stratrand

Stratified random point pattern
summary.owin

Summary of a Spatial Window
timeTaken

Extract the Total Computation Time
tile.areas

Compute Areas of Tiles in a Tessellation
timed

Record the Computation Time
where.max

Find Location of Maximum in a Pixel Image
subset.hyperframe

Subset of Hyperframe Satisfying A Condition
summary.splitppp

Summary of a Split Point Pattern
tiles

Extract List of Tiles in a Tessellation
summary.quad

Summarizing a Quadrature Scheme
test.crossing.psp

Check Whether Segments Cross
summary.distfun

Summarizing a Function of Spatial Location
tiles.empty

Check For Empty Tiles in a Tessellation
summary.anylist

Summary of a List of Things
summary.ppp

Summary of a Point Pattern Dataset
union.quad

Union of Data and Dummy Points
solutionset

Evaluate Logical Expression Involving Pixel Images and Return Region Where Expression is True
triangulate.owin

Decompose Window into Triangles
venn.tess

Tessellation Delimited by Several Sets
spatdim

Spatial Dimension of a Dataset
uniquemap.ppp

Map Duplicate Entries to Unique Entries
split.im

Divide Image Into Sub-images
split.hyperframe

Divide Hyperframe Into Subsets and Reassemble
unstack.ppp

Separate Multiple Columns of Marks
whichhalfplane

Test Which Side of Infinite Line a Point Falls On
tweak.colourmap

Change Colour Values in a Colour Map
transformquantiles

Transform the Quantiles
transmat

Convert Pixel Array Between Different Conventions
update.symbolmap

Update a Graphics Symbol Map.
unitname

Name for Unit of Length
symbolmap

Graphics Symbol Map
weighted.median

Weighted Median, Quantiles or Variance
vertices

Vertices of a Window
volume

Volume of an Object
zapsmall.im

Rounding of Pixel Values