Learn R Programming

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

spatstat.geom (version 2.4-0)

Geometrical Functionality of the 'spatstat' Family

Description

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

Copy Link

Version

Install

install.packages('spatstat.geom')

Monthly Downloads

64,669

Version

2.4-0

License

GPL (>= 2)

Maintainer

Adrian Baddeley

Last Published

March 29th, 2022

Functions in spatstat.geom (2.4-0)

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

Extract Subset of Line Segment Pattern
Extract.owin

Extract Subset of Window
Extract.layered

Extract or Replace Subset of a Layered Object
Extract.anylist

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

Extract Subset of Image
Extract.hyperframe

Extract or Replace Subset of Hyperframe
Extract.ppx

Extract Subset of Multidimensional Point Pattern
MinkowskiSum

Minkowski Sum of Windows
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
affine.psp

Apply Affine Transformation To Line Segment Pattern
affine.ppp

Apply Affine Transformation To Point Pattern
anyNA.im

Check Whether Image Contains NA Values
angles.psp

Orientation Angles of Line Segments
areaLoss

Difference of Disc Areas
affine.tess

Apply Geometrical Transformation To Tessellation
as.box3

Convert Data to Three-Dimensional Box
anylist

List of Objects
affine.im

Apply Affine Transformation To Pixel Image
Extract.tess

Extract or Replace Subset of Tessellation
affine.owin

Apply Affine Transformation To Window
as.function.im

Convert Pixel Image to Function of Coordinates
append.psp

Combine Two Line Segment Patterns
as.data.frame.tess

Convert Tessellation to Data Frame
Frame

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

Reset Values in Subset of Image
boundingbox

Bounding Box of a Window, Image, or Point Pattern
as.matrix.im

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

Convert Pixel Image to Matrix
bounding.box.xy

Convex Hull of Points
clickdist

Interactively Measure Distance
as.hyperframe.ppx

Extract coordinates and marks of multidimensional point pattern
affine

Apply Affine Transformation
add.texture

Fill Plot With Texture
as.hyperframe

Convert Data to Hyperframe
closing

Morphological Closing
clickpoly

Interactively Define a Polygon
closetriples

Close Triples of Points
as.data.frame.im

Convert Pixel Image to Data Frame
compatible

Test Whether Objects Are Compatible
as.data.frame.owin

Convert Window to Data Frame
applynbd

Apply Function to Every Neighbourhood in a Point Pattern
boundingcircle

Smallest Enclosing Circle
as.rectangle

Window Frame
as.solist

Convert List of Two-Dimensional Spatial Objects
as.function.tess

Convert a Tessellation to a Function
as.function.owin

Convert Window to Indicator Function
bdist.pixels

Distance to Boundary of Window
colourtools

Convert and Compare Colours in Different Formats
cbind.hyperframe

Combine Hyperframes by Rows or by Columns
as.mask.psp

Convert Line Segment Pattern to Binary Pixel Mask
as.mask

Pixel Image Approximation of a Window
as.boxx

Convert Data to Multi-Dimensional Box
as.tess

Convert Data To Tessellation
centroid.owin

Centroid of a window
box3

Three-Dimensional Box
compatible.im

Test Whether Pixel Images Are Compatible
as.data.frame.hyperframe

Coerce Hyperframe to Data Frame
contour.imlist

Array of Contour Plots
by.im

Apply Function to Image Broken Down by Factor
convexhull

Convex Hull
commonGrid

Determine A Common Spatial Domain And Pixel Resolution
Window

Extract or Change the Window of a Spatial Object
dilation

Morphological Dilation
crossdist.default

Pairwise distances between two different sets of points
Window.quad

Extract Window of Spatial Object
area.owin

Area of a Window
dilated.areas

Areas of Morphological Dilations
distfun

Distance Map as a Function
ellipse

Elliptical Window.
distmap

Distance Map
endpoints.psp

Endpoints of Line Segment Pattern
cut.im

Convert Pixel Image from Numeric to Factor
crossdist.pp3

Pairwise distances between two different three-dimensional point patterns
cut.ppp

Classify Points in a Point Pattern
distmap.ppp

Distance Map of Point Pattern
edit.hyperframe

Invoke Text Editor on Hyperframe
distmap.owin

Distance Map of Window
diameter.owin

Diameter of a Window
diameter.boxx

Geometrical Calculations for Multi-Dimensional Box
edit.ppp

Invoke Text Editor on Spatial Data
convexhull.xy

Convex Hull of Points
eval.im

Evaluate Expression Involving Pixel Images
erosionAny

Morphological Erosion of Windows
harmonise.im

Make Pixel Images Compatible
by.ppp

Apply a Function to a Point Pattern Broken Down by Factor
as.data.frame.ppp

Coerce Point Pattern to a Data Frame
clickppp

Interactively Add Points
clip.infline

Intersect Infinite Straight Lines with a Window
connected.tess

Connected Components of Tiles of a Tessellation
hotrod

Heat Kernel for a One-Dimensional Rod
harmonise.owin

Make Windows Compatible
hist.im

Histogram of Pixel Values in an Image
areaGain

Difference of Disc Areas
integral.im

Integral of a Pixel Image
inside.owin

Test Whether Points Are Inside A Window
convexify

Weil's Convexifying Operation
delaunayDistance

Distance on Delaunay Triangulation
as.im

Convert to Pixel Image
as.data.frame.psp

Coerce Line Segment Pattern to a Data Frame
intensity.quadratcount

Intensity Estimates Using Quadrat Counts
as.ppp

Convert Data To Class ppp
as.psp

Convert Data To Class psp
deltametric

Delta Metric
is.multitype.ppp

Test Whether A Point Pattern is Multitype
is.owin

Test Whether An Object Is A Window
beachcolours

Create Colour Scheme for a Range of Numbers
boxx

Multi-Dimensional Box
contour.im

Contour plot of pixel image
edges2triangles

List Triangles in a Graph
border

Border Region of a Window
convexmetric

Distance Metric Defined by Convex Set
distmap.psp

Distance Map of Line Segment Pattern
convolve.im

Convolution of Pixel Images
default.dummy

Generate a Default Pattern of Dummy Points
domain

Extract the Domain of any Spatial Object
edges2vees

List Dihedral Triples in a Graph
colouroutputs

Extract or Assign Colour Values in a Colour Map
bufftess

Buffer Distance Tessellation
covering

Cover Region with Discs
ewcdf

Weighted Empirical Cumulative Distribution Function
colourmap

Colour Lookup Tables
hextess

Hexagonal Grid or Tessellation
connected.ppp

Connected Components of a Point Pattern
connected

Connected components
extrapolate.psp

Extrapolate Line Segments to Obtain Infinite Lines
as.layered

Convert Data To Layered Object
crossdist

Pairwise distances
crossdist.ppx

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

Pairwise distances between two different point patterns
dirichletVertices

Vertices and Edges of Dirichlet Tessellation
interp.colourmap

Interpolate smoothly between specified colours
maxnndist

Compute Minimum or Maximum Nearest-Neighbour Distance
as.owin

Convert Data To Class owin
as.polygonal

Convert a Window to a Polygonal Window
dirichletWeights

Compute Quadrature Weights Based on Dirichlet Tessellation
discretise

Safely Convert Point Pattern Window to Binary Mask
edges

Extract Boundary Edges of a Window.
fourierbasis

Fourier Basis Functions
duplicated.ppp

Determine Duplicated Points in a Spatial Point Pattern
discs

Union of Discs
bdist.tiles

Distance to Boundary of Window
bdist.points

Distance to Boundary of Window
framedist.pixels

Distance to Bounding Frame
grow.rectangle

Add margins to rectangle
imcov

Spatial Covariance of a Pixel Image
harmonise

Make Objects Compatible
hist.funxy

Histogram of Values of a Spatial Function
dirichletAreas

Compute Areas of Tiles in Dirichlet Tessellation
delaunay

Delaunay Triangulation of Point Pattern
dirichlet

Dirichlet Tessellation of Point Pattern
incircle

Find Largest Circle Inside Window
inside.boxx

Test Whether Points Are Inside A Multidimensional Box
mean.ewcdf

Mean of Empirical Cumulative Distribution Function
infline

Infinite Straight Lines
midpoints.psp

Midpoints of Line Segment Pattern
discpartarea

Area of Part of Disc
disc

Circular Window
metric.object

Distance Metric
chop.tess

Subdivide a Window or Tessellation using a Set of Lines
clickbox

Interactively Define a Rectangle
eroded.areas

Areas of Morphological Erosions
headtail

First or Last Part of a Spatial Pattern
nnfun

Nearest Neighbour Index Map as a Function
erosion

Morphological Erosion by a Disc
has.close

Check Whether Points Have Close Neighbours
gridcentres

Rectangular grid of points
funxy

Spatial Function Class
closepairs

Close Pairs of Points
hyperframe

Hyper Data Frame
im.apply

Apply Function Pixelwise to List of Images
closepairs.pp3

Close Pairs of Points in 3 Dimensions
concatxy

Concatenate x,y Coordinate Vectors
complement.owin

Take Complement of a Window
im.object

Class of Images
invoke.symbolmap

Plot Data Using Graphics Symbol Map
is.im

Test Whether An Object Is A Pixel Image
invoke.metric

Perform Geometric Task using a Specified Metric
intensity

Intensity of a Dataset or a Model
is.linim

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

Empirical Intensity of Point Pattern
intensity.ppx

Intensity of a Multidimensional Space-Time Point Pattern
identify.ppp

Identify Points in a Point Pattern
intersect.tess

Intersection of Two Tessellations
intensity.psp

Empirical Intensity of Line Segment Pattern
intersect.owin

Intersection, Union or Set Subtraction of Windows
is.convex

Test Whether a Window is Convex
nnmap

K-th Nearest Point Map
overlap.owin

Compute Area of Overlap
opening

Morphological Opening
padimage

Pad the Border of a Pixel Image
owin2mask

Convert Window to Binary Mask under Constraints
coords

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

Determine Whether One Window is Contained In Another
layered

Create List of Plotting Layers
is.empty

Test Whether An Object Is Empty
is.marked.ppp

Test Whether A Point Pattern is Marked
corners

Corners of a rectangle
diameter

Diameter of an Object
crossdist.psp

Pairwise distances between two different line segment patterns
crossing.psp

Crossing Points of Two Line Segment Patterns
interp.im

Interpolate a Pixel Image
diameter.box3

Geometrical Calculations for Three-Dimensional Box
gridweights

Compute Quadrature Weights Based on Grid Counts
flipxy

Exchange X and Y Coordinates
fardist

Farthest Distance to Boundary of Window
intersect.boxx

Intersection Of Boxes Of Arbitrary Dimension
is.lpp

Test Whether An Object Is A Point Pattern on a Linear Network
mean.im

Mean and Median of Pixel Values in an Image
is.connected

Determine Whether an Object is Connected
is.ppp

Test Whether An Object Is A Point Pattern
im

Create a Pixel Image Object
is.rectangle

Determine Type of Window
is.connected.ppp

Determine Whether a Point Pattern is Connected
grow.boxx

Add margins to box in any dimension
identify.psp

Identify Segments in a Line Segment Pattern
is.marked

Test Whether Marks Are Present
is.multitype

Test whether Object is Multitype
pixelcentres

Extract Pixel Centres as Point Pattern
pixellate

Convert Spatial Object to Pixel Image
lengths_psp

Lengths of Line Segments
mergeLevels

Merge Levels of a Factor
levelset

Level Set of a Pixel Image
methods.pp3

Methods for three-dimensional point patterns
methods.layered

Methods for Layered Objects
layerplotargs

Extract or Replace the Plot Arguments of a Layered Object
layout.boxes

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

Marks of a Line Segment Pattern
marks.tess

Marks of a Tessellation
nncross.pp3

Nearest Neighbours Between Two Patterns in 3D
nncross.ppx

Nearest Neighbours Between Two Patterns in Any Dimensions
nearestValue

Image of Nearest Defined Pixel Value
nearestsegment

Find Line Segment Nearest to Each Point
markstat

Summarise Marks in Every Neighbourhood in a Point Pattern
nearest.raster.point

Find Pixel Nearest to a Given Point
matchingdist

Distance for a Point Pattern Matching
multiplicity.ppp

Count Multiplicity of Duplicate Points
methods.boxx

Methods for Multi-Dimensional Box
methods.box3

Methods for Three-Dimensional Box
plot.colourmap

Plot a Colour Map
plot.anylist

Plot a List of Things
lut

Lookup Tables
marks

Marks of a Point Pattern
pairdist.ppx

Pairwise Distances in Any Dimensions
pairdist.psp

Pairwise distances between line segments
nnmark

Mark of Nearest Neighbour
pairdist.pp3

Pairwise distances in Three Dimensions
nnwhich

Nearest neighbour
pairdist.ppp

Pairwise distances
nestsplit

Nested Split
periodify

Make Periodic Copies of a Spatial Pattern
perimeter

Perimeter Length of Window
plot.ppp

plot a Spatial Point Pattern
methods.ppx

Methods for Multidimensional Space-Time Point Patterns
plot.pppmatching

Plot a Point Matching
methods.unitname

Methods for Units
pixellate.psp

Convert Line Segment Pattern to Pixel Image
pixelquad

Quadrature Scheme Based on Pixel Grid
methods.distfun

Geometrical Operations for Distance Functions
pp3

Three Dimensional Point Pattern
methods.funxy

Methods for Spatial Functions
ppp

Create a Point Pattern
nncross

Nearest Neighbours Between Two Patterns
nnwhich.ppx

Nearest Neighbours in Any Dimensions
nnwhich.pp3

Nearest neighbours in three dimensions
perspPoints

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

Perspective Plot of Pixel Image
pairdist.default

Pairwise distances
pairdist

Pairwise distances
project2set

Find Nearest Point in a Region
psp

Create a Line Segment Pattern
nndist.pp3

Nearest neighbour distances in three dimensions
nndist

Nearest neighbour distances
nvertices

Count Number of Vertices
nsegments

Number of Line Segments in a Line Segment Pattern
owin.object

Class owin
owin

Create a Window
quantess

Quantile Tessellation
plot.solist

Plot a List of Spatial Objects
plot.quadratcount

Plot Quadrat Counts
pppmatching

Create a Point Matching
trim.rectangle

Cut margins from rectangle
pppmatching.object

Class of Point Matchings
nndist.ppx

Nearest Neighbour Distances in Any Dimensions
raster.x

Cartesian Coordinates for a Pixel Raster
rQuasi

Generate Quasirandom Point Pattern in Given Window
quantile.ewcdf

Quantiles of Weighted Empirical Cumulative Distribution Function
tess

Create a Tessellation
rotate.infline

Rotate or Shift Infinite Lines
rotate.im

Rotate a Pixel Image
plot.listof

Plot a List of Things
plot.onearrow

Plot an Arrow
nobjects

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

Nearest neighbour distances between line segments
plot.imlist

Plot a List of Images
plot.owin

Plot a Spatial Window
plot.layered

Layered Plot
plot.pp3

Plot a Three-Dimensional Point Pattern
progressreport

Print Progress Reports
project2segment

Move Point To Nearest Line
scalardilate

Apply Scalar Dilation
subset.psp

Subset of Line Segment Satisfying A Condition
npoints

Number of Points in a Point Pattern
scaletointerval

Rescale Data to Lie Between Specified Limits
plot.splitppp

Plot a List of Point Patterns
plot.symbolmap

Plot a Graphics Symbol Map
plot.textstring

Plot a Text String
plot.tess

Plot a Tessellation
plot.texturemap

Plot a Texture Map
plot.yardstick

Plot a Yardstick or Scale Bar
quadrats

Divide Region into Quadrats
quadratcount

Quadrat counting for a point pattern
print.psp

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

plot a Spatial Line Segment Pattern
plot.quad

Plot a Spatial Quadrature Scheme
print.quad

Print a Quadrature Scheme
rectdistmap

Distance Map Using Rectangular Distance Metric
reflect

Reflect In Origin
print.im

Print Brief Details of an Image
rescale.psp

Convert Line Segment Pattern to Another Unit of Length
requireversion

Require a Specific Version of a Package
rescale

Convert dataset to another unit of length
quadscheme

Generate a Quadrature Scheme from a Point Pattern
solist

List of Two-Dimensional Spatial Objects
shift.ppx

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

Apply a Function Over a List and Obtain a List of Objects
shift.ppp

Apply Vector Translation To Point Pattern
rounding

Detect Numerical Rounding
spatstat.geom-package

The spatstat.geom Package
pixellate.owin

Convert Window to Pixel Image
pixellate.ppp

Convert Point Pattern to Pixel Image
pointsOnLines

Place Points Evenly Along Specified Lines
polartess

Tessellation Using Polar Coordinates
ppx

Multidimensional Space-Time Point Pattern
ripras

Estimate window from points alone
run.simplepanel

Run Point-and-Click Interface
psp.object

Class of Line Segment Patterns
quad.object

Class of Quadrature Schemes
rjitter

Random Perturbation of a Point Pattern
rescale.ppp

Convert Point Pattern to Another Unit of Length
subset.ppp

Subset of Point Pattern Satisfying A Condition
rsyst

Simulate systematic random point pattern
shift.psp

Apply Vector Translation To Line Segment Pattern
summary.anylist

Summary of a List of Things
shift.im

Apply Vector Translation To Pixel Image
split.hyperframe

Divide Hyperframe Into Subsets and Reassemble
summary.psp

Summary of a Line Segment Pattern Dataset
spatstat.geom-deprecated

Deprecated spatstat.geom functions
tiles

Extract List of Tiles in a Tessellation
spatstat.geom-internal

Internal spatstat.geom functions
shift.owin

Apply Vector Translation To Window
runifrect

Generate N Uniform Random Points in a Rectangle
plot.hyperframe

Plot Entries in a Hyperframe
plot.im

Plot a Pixel Image
rescale.im

Convert Pixel Image to Another Unit of Length
rlinegrid

Generate grid of parallel lines with random displacement
rescale.owin

Convert Window to Another Unit of Length
symbolmap

Graphics Symbol Map
superimpose

Superimpose Several Geometric Patterns
quadscheme.logi

Generate a Logistic Regression Quadrature Scheme from a Point Pattern
stratrand

Stratified random point pattern
union.quad

Union of Data and Dummy Points
scanpp

Read Point Pattern From Data File
sidelengths.owin

Side Lengths of Enclosing Rectangle of a Window
spatstat.options

Internal Options in Spatstat Package
unitname

Name for Unit of Length
split.im

Divide Image Into Sub-images
ppp.object

Class of Point Patterns
summary.quad

Summarizing a Quadrature Scheme
pppdist

Distance Between Two Point Patterns
timeTaken

Extract the Total Computation Time
timed

Record the Computation Time
summary.im

Summarizing a Pixel Image
print.ppp

Print Brief Details of a Point Pattern Dataset
print.owin

Print Brief Details of a Spatial Window
selfcrossing.psp

Crossing Points in a Line Segment Pattern
rotate

Rotate
uniquemap.ppp

Map Duplicate Entries to Unique Entries
test.crossing.psp

Check Whether Segments Cross
selfcut.psp

Cut Line Segments Where They Intersect
tweak.colourmap

Change Colour Values in a Colour Map
spokes

Spokes pattern of dummy points
rotate.owin

Rotate a Window
quantile.im

Sample Quantiles of Pixel Image
update.symbolmap

Update a Graphics Symbol Map.
venn.tess

Tessellation Delimited by Several Sets
summary.listof

Summary of a List of Things
triangulate.owin

Decompose Window into Triangles
rotate.ppp

Rotate a Point Pattern
sessionLibs

Print Names and Version Numbers of Libraries Loaded
square

Square Window
summary.splitppp

Summary of a Split Point Pattern
summary.solist

Summary of a List of Spatial Objects
setcov

Set Covariance of a Window
subset.hyperframe

Subset of Hyperframe Satisfying A Condition
quasirandom

Quasirandom Patterns
transmat

Convert Pixel Array Between Different Conventions
summary.distfun

Summarizing a Function of Spatial Location
unmark

Remove Marks
shift

Apply Vector Translation
regularpolygon

Create A Regular Polygon
tileindex

Determine Which Tile Contains Each Given Point
weighted.median

Weighted Median, Quantiles or Variance
tiles.empty

Check For Empty Tiles in a Tessellation
textureplot

Plot Image or Tessellation Using Texture Fill
with.hyperframe

Evaluate an Expression in Each Row of a Hyperframe
yardstick

Text, Arrow or Scale Bar in a Diagram
spatdim

Spatial Dimension of a Dataset
solutionset

Evaluate Logical Expression Involving Pixel Images and Return Region Where Expression is True
tile.areas

Compute Areas of Tiles in a Tessellation
uniquemap.default

Map Duplicate Entries to Unique Entries
unnormdensity

Weighted kernel smoother
relevel.im

Reorder Levels of a Factor-Valued Image or Pattern
rescue.rectangle

Convert Window Back To Rectangle
transformquantiles

Transform the Quantiles
where.max

Find Location of Maximum in a Pixel Image
rgbim

Create Colour-Valued Pixel Image
rotate.psp

Rotate a Line Segment Pattern
round.ppp

Apply Numerical Rounding to Spatial Coordinates
simplepanel

Simple Point-and-Click Interface Panels
vertices

Vertices of a Window
simplify.owin

Approximate a Polygon by a Simpler Polygon
text.ppp

Add Text Labels to Spatial Pattern
split.ppp

Divide Point Pattern into Sub-patterns
summary.owin

Summary of a Spatial Window
summary.ppp

Summary of a Point Pattern Dataset
zapsmall.im

Rounding of Pixel Values
unstack.ppp

Separate Multiple Columns of Marks
volume

Volume of an Object
split.ppx

Divide Multidimensional Point Pattern into Sub-patterns
tilenames

Names of Tiles in a Tessellation
texturemap

Texture Map
unique.ppp

Extract Unique Points from a Spatial Point Pattern
whichhalfplane

Test Which Side of Infinite Line a Point Falls On
whist

Weighted Histogram
unstack.solist

Unstack Each Spatial Object in a List of Objects