Learn R Programming

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

spatstat.geom (version 3.2-2)

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

73,410

Version

3.2-2

License

GPL (>= 2)

Maintainer

Adrian Baddeley

Last Published

July 6th, 2023

Functions in spatstat.geom (3.2-2)

Extract.psp

Extract Subset of Line Segment Pattern
Extract.im

Extract Subset of Image
Extract.anylist

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

Subset of Quadrature Scheme
Extract.ppp

Extract or Replace Subset of Point Pattern
Extract.listof

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

Extract Subset of Window
Window

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

Extract or Replace Subset of a Layered Object
Extract.tess

Extract or Replace Subset of Tessellation
Extract.solist

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

Extract Subset of Multidimensional Point Pattern
Frame

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

Extract Window of Spatial Object
Math.im

S3 Group Generic methods for images
Math.imlist

S3 Group Generic methods for List of Images
Extract.splitppp

Extract or Replace Sub-Patterns
affine.tess

Apply Geometrical Transformation To Tessellation
angles.psp

Orientation Angles of Line Segments
affine.im

Apply Affine Transformation To Pixel Image
as.boxx

Convert Data to Multi-Dimensional Box
as.im

Convert to Pixel Image
Extract.hyperframe

Extract or Replace Subset of Hyperframe
MinkowskiSum

Minkowski Sum of Windows
as.hyperframe.ppx

Extract coordinates and marks of multidimensional point pattern
append.psp

Combine Two Line Segment Patterns
as.rectangle

Window Frame
affine.ppp

Apply Affine Transformation To Point Pattern
affine.owin

Apply Affine Transformation To Window
as.colourmap

Convert to Colour Map
area.owin

Area of a Window
as.box3

Convert Data to Three-Dimensional Box
as.data.frame.owin

Convert Window to Data Frame
centroid.owin

Centroid of a window
as.solist

Convert List of Two-Dimensional Spatial Objects
Replace.im

Reset Values in Subset of Image
as.ppp

Convert Data To Class ppp
compatible

Test Whether Objects Are Compatible
affine.psp

Apply Affine Transformation To Line Segment Pattern
connected

Connected components
as.data.frame.ppp

Coerce Point Pattern to a Data Frame
anylist

List of Objects
as.owin

Convert Data To Class owin
areaLoss

Difference of Disc Areas
applynbd

Apply Function to Every Neighbourhood in a Point Pattern
border

Border Region of a Window
bounding.box.xy

Convex Hull of Points
as.function.tess

Convert a Tessellation to a Function
as.function.im

Convert Pixel Image to Function of Coordinates
as.matrix.im

Convert Pixel Image to Matrix or Array
bdist.points

Distance to Boundary of Window
as.function.owin

Convert Window to Indicator Function
delaunay

Delaunay Triangulation of Point Pattern
bdist.tiles

Distance to Boundary of Window
as.matrix.owin

Convert Pixel Image to Matrix
as.hyperframe

Convert Data to Hyperframe
as.layered

Convert Data To Layered Object
crossdist.default

Pairwise distances between two different sets of points
commonGrid

Determine A Common Spatial Domain And Pixel Resolution
as.polygonal

Convert a Window to a Polygonal Window
erosionAny

Morphological Erosion of Windows
clickdist

Interactively Measure Distance
add.texture

Fill Plot With Texture
colourtools

Convert and Compare Colours in Different Formats
affine

Apply Affine Transformation
complement.owin

Take Complement of a Window
convexhull

Convex Hull
anyNA.im

Check Whether Image Contains NA Values
clickpoly

Interactively Define a Polygon
coords

Extract or Change Coordinates of a Spatial or Spatiotemporal Point Pattern
as.tess

Convert Data To Tessellation
dirichletAreas

Compute Areas of Tiles in Dirichlet Tessellation
colouroutputs

Extract or Assign Colour Values in a Colour Map
boundingbox

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

Diameter of an Object
areaGain

Difference of Disc Areas
as.data.frame.hyperframe

Coerce Hyperframe to Data Frame
as.mask

Pixel Image Approximation of a Window
as.data.frame.im

Convert Pixel Image to Data Frame
by.im

Apply Function to Image Broken Down by Factor
crossdist.pp3

Pairwise distances between two different three-dimensional point patterns
convexhull.xy

Convex Hull of Points
closing

Morphological Closing
cbind.hyperframe

Combine Hyperframes by Rows or by Columns
bdist.pixels

Distance to Boundary of Window
as.data.frame.tess

Convert Tessellation to Data Frame
contour.imlist

Array of Contour Plots
concatxy

Concatenate x,y Coordinate Vectors
corners

Corners of a rectangle
colourmap

Colour Lookup Tables
as.data.frame.psp

Coerce Line Segment Pattern to a Data Frame
closepairs.pp3

Close Pairs of Points in 3 Dimensions
clickbox

Interactively Define a Rectangle
closetriples

Close Triples of Points
beachcolours

Create Colour Scheme for a Range of Numbers
delaunayDistance

Distance on Delaunay Triangulation
by.ppp

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

Test Whether Pixel Images Are Compatible
boxx

Multi-Dimensional Box
is.owin

Test Whether An Object Is A Window
crossdist.ppp

Pairwise distances between two different point patterns
bufftess

Buffer Distance Tessellation
discs

Union of Discs
discpartarea

Area of Part of Disc
framedist.pixels

Distance to Bounding Frame
inside.owin

Test Whether Points Are Inside A Window
im.object

Class of Images
boundingcircle

Smallest Enclosing Circle
default.dummy

Generate a Default Pattern of Dummy Points
dilated.areas

Areas of Morphological Dilations
distmap.owin

Distance Map of Window
nncross.pp3

Nearest Neighbours Between Two Patterns in 3D
is.connected.ppp

Determine Whether a Point Pattern is Connected
diameter.box3

Geometrical Calculations for Three-Dimensional Box
connected.tess

Connected Components of Tiles of a Tessellation
disc

Circular Window
as.psp

Convert Data To Class psp
intensity.quadratcount

Intensity Estimates Using Quadrat Counts
discretise

Safely Convert Point Pattern Window to Binary Mask
contour.im

Contour plot of pixel image
diameter.owin

Diameter of a Window
closepairs

Close Pairs of Points
is.lpp

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

Test Whether A Point Pattern is Marked
crossdist.psp

Pairwise distances between two different line segment patterns
deltametric

Delta Metric
duplicated.ppp

Determine Duplicated Points in a Spatial Point Pattern
convolve.im

Convolution of Pixel Images
fardist

Farthest Distance to Boundary of Window
dirichlet

Dirichlet Tessellation of Point Pattern
is.linim

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

Subdivide a Window or Tessellation using a Set of Lines
box3

Three-Dimensional Box
connected.ppp

Connected Components of a Point Pattern
convexmetric

Distance Metric Defined by Convex Set
crossdist.ppx

Pairwise Distances Between Two Different Multi-Dimensional Point Patterns
gridcentres

Rectangular grid of points
hextess

Hexagonal Grid or Tessellation
clickppp

Interactively Add Points
dilation

Morphological Dilation
edges2vees

List Dihedral Triples in a Graph
headtail

First or Last Part of a Spatial Pattern
convexify

Weil's Convexifying Operation
crossing.psp

Crossing Points of Two Line Segment Patterns
harmonise.im

Make Pixel Images Compatible
eroded.areas

Areas of Morphological Erosions
funxy

Spatial Function Class
clip.infline

Intersect Infinite Straight Lines with a Window
distfun

Distance Map as a Function
plot.pp3

Plot a Three-Dimensional Point Pattern
distmap

Distance Map
dirichletVertices

Vertices and Edges of Dirichlet Tessellation
dirichletWeights

Compute Quadrature Weights Based on Dirichlet Tessellation
distmap.ppp

Distance Map of Point Pattern
fourierbasis

Fourier Basis Functions
marks.psp

Marks of a Line Segment Pattern
owin

Create a Window
eval.im

Evaluate Expression Involving Pixel Images
covering

Cover Region with Discs
edit.hyperframe

Invoke Text Editor on Hyperframe
ellipse

Elliptical Window.
intersect.tess

Intersection of Two Tessellations
harmoniseLevels

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

Morphological Erosion by a Disc
incircle

Find Largest Circle Inside Window
distmap.psp

Distance Map of Line Segment Pattern
interp.im

Interpolate a Pixel Image
endpoints.psp

Endpoints of Line Segment Pattern
methods.layered

Methods for Layered Objects
methods.pp3

Methods for three-dimensional point patterns
domain

Extract the Domain of any Spatial Object
crossdist

Pairwise distances
intensity.ppx

Intensity of a Multidimensional Space-Time Point Pattern
imcov

Spatial Covariance of a Pixel Image
rgbim

Create Colour-Valued Pixel Image
cut.im

Convert Pixel Image from Numeric to Factor
is.connected

Determine Whether an Object is Connected
im

Create a Pixel Image Object
edit.ppp

Invoke Text Editor on Spatial Data
hotrod

Heat Kernel for a One-Dimensional Rod
intensity.psp

Empirical Intensity of Line Segment Pattern
cut.ppp

Classify Points in a Point Pattern
has.close

Check Whether Points Have Close Neighbours
scaletointerval

Rescale Data to Lie Between Specified Limits
is.convex

Test Whether a Window is Convex
identify.psp

Identify Segments in a Line Segment Pattern
flipxy

Exchange X and Y Coordinates
diameter.boxx

Geometrical Calculations for Multi-Dimensional Box
matchingdist

Distance for a Point Pattern Matching
intensity

Intensity of a Dataset or a Model
nnmap

K-th Nearest Point Map
is.boxx

Recognise a Multi-Dimensional Box
edges2triangles

List Triangles in a Graph
plot.solist

Plot a List of Spatial Objects
levelset

Level Set of a Pixel Image
is.linnet

Test Whether An Object Is A Linear Network
grow.rectangle

Add margins to rectangle
ewcdf

Weighted Empirical Cumulative Distribution Function
edges

Extract Boundary Edges of a Window.
opening

Morphological Opening
rescale.ppp

Convert Point Pattern to Another Unit of Length
intensity.ppp

Empirical Intensity of Point Pattern
multiplicity.ppp

Count Multiplicity of Duplicate Points
invoke.symbolmap

Plot Data Using Graphics Symbol Map
mean.im

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

Geometrical Operations for Distance Functions
extrapolate.psp

Extrapolate Line Segments to Obtain Infinite Lines
im.apply

Apply Function Pixelwise to List of Images
gridweights

Compute Quadrature Weights Based on Grid Counts
inside.boxx

Test Whether Points Are Inside A Multidimensional Box
layered

Create List of Plotting Layers
methods.ppx

Methods for Multidimensional Space-Time Point Patterns
harmonise

Make Objects Compatible
harmonise.owin

Make Windows Compatible
methods.boxx

Methods for Multi-Dimensional Box
is.multitype.ppp

Test Whether A Point Pattern is Multitype
hist.funxy

Histogram of Values of a Spatial Function
identify.ppp

Identify Points in a Point Pattern
hist.im

Histogram of Pixel Values in an Image
grow.boxx

Add margins to box in any dimension
hyperframe

Hyper Data Frame
lengths_psp

Lengths of Line Segments
nearestsegment

Find Line Segment Nearest to Each Point
is.subset.owin

Determine Whether One Window is Contained In Another
plot.layered

Layered Plot
nearestValue

Image of Nearest Defined Pixel Value
nnwhich.pp3

Nearest neighbours in three dimensions
plot.owin

Plot a Spatial Window
intersect.owin

Intersection, Union or Set Subtraction of Windows
marks

Marks of a Point Pattern
is.multitype

Test whether Object is Multitype
plot.yardstick

Plot a Yardstick or Scale Bar
nsegments

Number of Line Segments in a Line Segment Pattern
periodify

Make Periodic Copies of a Spatial Pattern
pixellate

Convert Spatial Object to Pixel Image
interp.colourmap

Interpolate smoothly between specified colours
layerplotargs

Extract or Replace the Plot Arguments of a Layered Object
intersect.boxx

Intersection Of Boxes Of Arbitrary Dimension
persp.im

Perspective Plot of Pixel Image
nnwhich.ppx

Nearest Neighbours in Any Dimensions
print.quad

Print a Quadrature Scheme
rectdistmap

Distance Map Using Rectangular Distance Metric
plot.listof

Plot a List of Things
restrict.colourmap

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

Convert Window to Pixel Image
pppmatching.object

Class of Point Matchings
nvertices

Count Number of Vertices
summary.im

Summarizing a Pixel Image
subset.hyperframe

Subset of Hyperframe Satisfying A Condition
integral.density

Compute Integral of One-Dimensional Kernel Density Estimate.
scanpp

Read Point Pattern From Data File
is.marked

Test Whether Marks Are Present
plot.hyperframe

Plot Entries in a Hyperframe
infline

Infinite Straight Lines
integral.im

Integral of a Pixel Image
plot.im

Plot a Pixel Image
summary.splitppp

Summary of a Split Point Pattern
invoke.metric

Perform Geometric Task using a Specified Metric
maxnndist

Compute Minimum or Maximum Nearest-Neighbour Distance
ppp

Create a Point Pattern
methods.unitname

Methods for Units
plot.quad

Plot a Spatial Quadrature Scheme
mergeLevels

Merge Levels of a Factor
layout.boxes

Generate a Row or Column Arrangement of Rectangles.
methods.box3

Methods for Three-Dimensional Box
is.im

Test Whether An Object Is A Pixel Image
is.ppp

Test Whether An Object Is A Point Pattern
is.rectangle

Determine Type of Window
plot.colourmap

Plot a Colour Map
is.empty

Test Whether An Object Is Empty
nestsplit

Nested Split
nearest.raster.point

Find Pixel Nearest to a Given Point
plot.splitppp

Plot a List of Point Patterns
lut

Lookup Tables
polartess

Tessellation Using Polar Coordinates
nndist.psp

Nearest neighbour distances between line segments
progressreport

Print Progress Reports
markstat

Summarise Marks in Every Neighbourhood in a Point Pattern
ppx

Multidimensional Space-Time Point Pattern
shift

Apply Vector Translation
marks.tess

Marks of a Tessellation
psp

Create a Line Segment Pattern
midpoints.psp

Midpoints of Line Segment Pattern
nnmark

Mark of Nearest Neighbour
quadrats

Divide Region into Quadrats
plot.textstring

Plot a Text String
test.crossing.psp

Check Whether Segments Cross
pHcolourmap

Colour Map for pH Values
nobjects

Count Number of Geometrical Objects in a Spatial Dataset
project2set

Find Nearest Point in a Region
raster.x

Cartesian Coordinates for a Pixel Raster
pppmatching

Create a Point Matching
pairdist.psp

Pairwise distances between line segments
rescale.owin

Convert Window to Another Unit of Length
unnormdensity

Weighted kernel smoother
perimeter

Perimeter Length of Window
metric.object

Distance Metric
plot.texturemap

Plot a Texture Map
nnfun

Nearest Neighbour Index Map as a Function
pairdist.pp3

Pairwise distances in Three Dimensions
run.simplepanel

Run Point-and-Click Interface
nncross.ppx

Nearest Neighbours Between Two Patterns in Any Dimensions
pixelquad

Quadrature Scheme Based on Pixel Grid
nnwhich

Nearest neighbour
plot.onearrow

Plot an Arrow
mean.ewcdf

Mean of Empirical Cumulative Distribution Function
plot.psp

plot a Spatial Line Segment Pattern
plot.pppmatching

Plot a Point Matching
sidelengths.owin

Side Lengths of Enclosing Rectangle of a Window
transformquantiles

Transform the Quantiles
print.owin

Print Brief Details of a Spatial Window
print.im

Print Brief Details of an Image
spatdim

Spatial Dimension of a Dataset
pairdist.ppp

Pairwise distances
owin.object

Class owin
psp2mask

Convert Line Segment Pattern to Binary Pixel Mask
unstack.solist

Unstack Each Spatial Object in a List of Objects
shift.im

Apply Vector Translation To Pixel Image
pairdist.default

Pairwise distances
methods.funxy

Methods for Spatial Functions
nndist

Nearest neighbour distances
plot.anylist

Plot a List of Things
nndist.pp3

Nearest neighbour distances in three dimensions
nndist.ppx

Nearest Neighbour Distances in Any Dimensions
tile.areas

Compute Areas of Tiles in a Tessellation
nncross

Nearest Neighbours Between Two Patterns
pairdist.ppx

Pairwise Distances in Any Dimensions
overlap.owin

Compute Area of Overlap
project2segment

Move Point To Nearest Line
ppp.object

Class of Point Patterns
split.hyperframe

Divide Hyperframe Into Subsets and Reassemble
solist

List of Two-Dimensional Spatial Objects
square

Square Window
reflect

Reflect In Origin
selfcrossing.psp

Crossing Points in a Line Segment Pattern
quasirandom

Quasirandom Patterns
rounding

Detect Numerical Rounding
quad.object

Class of Quadrature Schemes
npoints

Number of Points in a Point Pattern
quantile.ewcdf

Quantiles of Weighted Empirical Cumulative Distribution Function
padimage

Pad the Border of a Pixel Image
owin2mask

Convert Window to Binary Mask under Constraints
sessionLibs

Print Names and Version Numbers of Libraries Loaded
pixellate.psp

Convert Line Segment Pattern to Pixel Image
rotate.ppp

Rotate a Point Pattern
rexplode

Explode a Point Pattern by Displacing Duplicated Points
pixelcentres

Extract Pixel Centres as Point Pattern
pp3

Three Dimensional Point Pattern
pixellate.ppp

Convert Point Pattern to Pixel Image
pairdist

Pairwise distances
rQuasi

Generate Quasirandom Point Pattern in Given Window
symbolmap

Graphics Symbol Map
ripras

Estimate window from points alone
quadratcount

Quadrat counting for a point pattern
print.ppp

Print Brief Details of a Point Pattern Dataset
quadscheme

Generate a Quadrature Scheme from a Point Pattern
plot.symbolmap

Plot a Graphics Symbol Map
plot.imlist

Plot a List of Images
plot.ppp

plot a Spatial Point Pattern
plot.tess

Plot a Tessellation
perspPoints

Draw Points or Lines on a Surface Viewed in Perspective
rotate.infline

Rotate or Shift Infinite Lines
rescale.psp

Convert Line Segment Pattern to Another Unit of Length
rotate.im

Rotate a Pixel Image
solutionset

Evaluate Logical Expression Involving Pixel Images and Return Region Where Expression is True
rotate.psp

Rotate a Line Segment Pattern
rescale

Convert dataset to another unit of length
plot.quadratcount

Plot Quadrat Counts
rotate.owin

Rotate a Window
setcov

Set Covariance of a Window
rescue.rectangle

Convert Window Back To Rectangle
pppdist

Distance Between Two Point Patterns
zapsmall.im

Rounding of Pixel Values
quantile.im

Sample Quantiles of Pixel Image
selfcut.psp

Cut Line Segments Where They Intersect
quadscheme.logi

Generate a Logistic Regression Quadrature Scheme from a Point Pattern
pointsOnLines

Place Points Evenly Along Specified Lines
timed

Record the Computation Time
rjitter

Random Perturbation of a Point Pattern
relevel.im

Reorder Levels of a Factor-Valued Image or Pattern
regularpolygon

Create A Regular Polygon
uniquemap.ppp

Map Duplicate Entries to Unique Entries
quantilefun

Quantile Function
quantess

Quantile Tessellation
round.ppp

Apply Numerical Rounding to Spatial Coordinates
text.ppp

Add Text Labels to Spatial Pattern
rsyst

Simulate systematic random point pattern
shift.ppx

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

Divide Multidimensional Point Pattern into Sub-patterns
texturemap

Texture Map
requireversion

Require a Specific Version of a Package
spatstat.options

Internal Options in Spatstat Package
summary.psp

Summary of a Line Segment Pattern Dataset
rlinegrid

Generate grid of parallel lines with random displacement
shift.owin

Apply Vector Translation To Window
spokes

Spokes pattern of dummy points
whist

Weighted Histogram
print.psp

Print Brief Details of a Line Segment Pattern Dataset
tiles

Extract List of Tiles in a Tessellation
runifrect

Generate N Uniform Random Points in a Rectangle
psp.object

Class of Line Segment Patterns
summary.listof

Summary of a List of Things
with.hyperframe

Evaluate an Expression in Each Row of a Hyperframe
scalardilate

Apply Scalar Dilation
summary.ppp

Summary of a Point Pattern Dataset
tweak.colourmap

Change Colour Values in a Colour Map
tileindex

Determine Which Tile Contains Each Given Point
rotate

Rotate
shift.ppp

Apply Vector Translation To Point Pattern
trim.rectangle

Cut margins from rectangle
summary.distfun

Summarizing a Function of Spatial Location
whichhalfplane

Test Which Side of Infinite Line a Point Falls On
shift.psp

Apply Vector Translation To Line Segment Pattern
transmat

Convert Pixel Array Between Different Conventions
tess

Create a Tessellation
stratrand

Stratified random point pattern
spatstat.geom-deprecated

Deprecated spatstat.geom functions
simplepanel

Simple Point-and-Click Interface Panels
summary.quad

Summarizing a Quadrature Scheme
where.max

Find Location of Maximum in a Pixel Image
subset.psp

Subset of Line Segment Satisfying A Condition
union.quad

Union of Data and Dummy Points
unique.ppp

Extract Unique Points from a Spatial Point Pattern
summary.anylist

Summary of a List of Things
textureplot

Plot Image or Tessellation Using Texture Fill
rescale.im

Convert Pixel Image to Another Unit of Length
unitname

Name for Unit of Length
triangulate.owin

Decompose Window into Triangles
tiles.empty

Check For Empty Tiles in a Tessellation
subset.ppp

Subset of Point Pattern Satisfying A Condition
spatstat.geom-internal

Internal spatstat.geom functions
superimpose

Superimpose Several Geometric Patterns
update.symbolmap

Update a Graphics Symbol Map.
uniquemap.default

Map Duplicate Entries to Unique Entries
spatstat.geom-package

The spatstat.geom Package
simplify.owin

Approximate a Polygon by a Simpler Polygon
summary.solist

Summary of a List of Spatial Objects
timeTaken

Extract the Total Computation Time
split.im

Divide Image Into Sub-images
unstack.ppp

Separate Multiple Columns of Marks
yardstick

Text, Arrow or Scale Bar in a Diagram
volume

Volume of an Object
unmark

Remove Marks
weighted.median

Weighted Median, Quantiles or Variance
solapply

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

Names of Tiles in a Tessellation
split.ppp

Divide Point Pattern into Sub-patterns
summary.owin

Summary of a Spatial Window
vertices

Vertices of a Window
venn.tess

Tessellation Delimited by Several Sets