Learn R Programming

spatstat.geom (version 3.3-3)

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

License

GPL (>= 2)

Maintainer

Last Published

September 18th, 2024

Functions in spatstat.geom (3.3-3)

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
Extract.hyperframe

Extract or Replace Subset of Hyperframe
Extract.ppx

Extract Subset of Multidimensional Point Pattern
Extract.layered

Extract or Replace Subset of a Layered Object
Extract.psp

Extract Subset of Line Segment Pattern
Extract.anylist

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

Subset of Quadrature Scheme
Extract.im

Extract Subset of Image
Extract.solist

Extract or Replace Subset of a List of Spatial Objects
Math.im

S3 Group Generic methods for images
Extract.tess

Extract or Replace Subset of Tessellation
Extract.splitppp

Extract or Replace Sub-Patterns
Math.imlist

S3 Group Generic methods for List of Images
Window.tess

Extract Window of Spatial Object
Frame

Extract or Change the Containing Rectangle of a Spatial Object
Window

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

Apply Geometrical Transformation To Tessellation
affine.im

Apply Affine Transformation To Pixel Image
Replace.im

Reset Values in Subset of Image
MinkowskiSum

Minkowski Sum of Windows
affine.owin

Apply Affine Transformation To Window
add.texture

Fill Plot With Texture
angles.psp

Orientation Angles of Line Segments
as.colourmap

Convert to Colour Map
anyNA.im

Check Whether Image Contains NA Values
as.boxx

Convert Data to Multi-Dimensional Box
anylist

List of Objects
area.owin

Area of a Window
areaGain

Difference of Disc Areas
as.data.frame.hyperframe

Coerce Hyperframe to Data Frame
affine

Apply Affine Transformation
as.data.frame.im

Convert Pixel Image to Data Frame
areaLoss

Difference of Disc Areas
as.function.tess

Convert a Tessellation to a Function
as.data.frame.ppp

Coerce Point Pattern to a Data Frame
as.data.frame.owin

Convert Window to Data Frame
as.hyperframe

Convert Data to Hyperframe
as.data.frame.psp

Coerce Line Segment Pattern to a Data Frame
as.data.frame.tess

Convert Tessellation to Data Frame
as.function.im

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

Convert Window to Indicator Function
as.matrix.im

Convert Pixel Image to Matrix or Array
as.rectangle

Window Frame
as.solist

Convert List of Two-Dimensional Spatial Objects
as.owin

Convert Data To Class owin
as.box3

Convert Data to Three-Dimensional Box
affine.ppp

Apply Affine Transformation To Point Pattern
beachcolours

Create Colour Scheme for a Range of Numbers
border

Border Region of a Window
bdist.points

Distance to Boundary of Window
bdist.tiles

Distance to Boundary of Window
as.matrix.owin

Convert Pixel Image to Matrix
clickdist

Interactively Measure Distance
as.polygonal

Convert a Window to a Polygonal Window
clickpoly

Interactively Define a Polygon
affine.psp

Apply Affine Transformation To Line Segment Pattern
closetriples

Close Triples of Points
append.psp

Combine Two Line Segment Patterns
closing

Morphological Closing
as.hyperframe.ppx

Extract coordinates and marks of multidimensional point pattern
closepairs

Close Pairs of Points
compatible

Test Whether Objects Are Compatible
boundingcircle

Smallest Enclosing Circle
as.im

Convert to Pixel Image
closepairs.pp3

Close Pairs of Points in 3 Dimensions
applynbd

Apply Function to Every Neighbourhood in a Point Pattern
box3

Three-Dimensional Box
chop.tess

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

Test Whether Pixel Images Are Compatible
connected.tess

Connected Components of Tiles of a Tessellation
as.ppp

Convert Data To Class ppp
contour.im

Contour plot of pixel image
clickbox

Interactively Define a Rectangle
by.im

Apply Function to Image Broken Down by Factor
coords

Extract or Change Coordinates of a Spatial or Spatiotemporal Point Pattern
contour.imlist

Array of Contour Plots
corners

Corners of a rectangle
by.ppp

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

Convert Data To Class psp
convexhull

Convex Hull
crossdist.psp

Pairwise distances between two different line segment patterns
bounding.box.xy

Convex Hull of Points
colourtools

Convert and Compare Colours in Different Formats
as.layered

Convert Data To Layered Object
diameter.boxx

Geometrical Calculations for Multi-Dimensional Box
commonGrid

Determine A Common Spatial Domain And Pixel Resolution
crossdist.default

Pairwise distances between two different sets of points
boundingbox

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

Cover Region with Discs
crossdist.pp3

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

Diameter of a Window
discretise

Safely Convert Point Pattern Window to Binary Mask
default.dummy

Generate a Default Pattern of Dummy Points
crossing.psp

Crossing Points of Two Line Segment Patterns
boxx

Multi-Dimensional Box
default.symbolmap

Default Symbol Map for Plotting a Spatial Pattern
discs

Union of Discs
duplicated.ppp

Determine Duplicated Points in a Spatial Point Pattern
distfun

Distance Map as a Function
edges

Extract Boundary Edges of a Window.
distmap

Distance Map
distmap.psp

Distance Map of Line Segment Pattern
domain

Extract the Domain of any Spatial Object
diameter

Diameter of an Object
flipxy

Exchange X and Y Coordinates
crossdist

Pairwise distances
fourierbasis

Fourier Basis Functions
as.mask

Pixel Image Approximation of a Window
as.tess

Convert Data To Tessellation
bufftess

Buffer Distance Tessellation
incircle

Find Largest Circle Inside Window
colourmap

Colour Lookup Tables
erosionAny

Morphological Erosion of Windows
eval.im

Evaluate Expression Involving Pixel Images
has.close

Check Whether Points Have Close Neighbours
default.symbolmap.ppp

Default Symbol Map for Point Pattern
infline

Infinite Straight Lines
bdist.pixels

Distance to Boundary of Window
invoke.symbolmap

Plot Data Using Graphics Symbol Map
colouroutputs

Extract or Assign Colour Values in a Colour Map
delaunay

Delaunay Triangulation of Point Pattern
dirichlet

Dirichlet Tessellation of Point Pattern
dirichletAreas

Compute Areas of Tiles in Dirichlet Tessellation
headtail

First or Last Part of a Spatial Pattern
im.object

Class of Images
cbind.hyperframe

Combine Hyperframes by Rows or by Columns
is.boxx

Recognise a Multi-Dimensional Box
imcov

Spatial Covariance of a Pixel Image
diameter.box3

Geometrical Calculations for Three-Dimensional Box
connected

Connected components
dirichletVertices

Vertices and Edges of Dirichlet Tessellation
is.rectangle

Determine Type of Window
disc

Circular Window
discpartarea

Area of Part of Disc
edit.hyperframe

Invoke Text Editor on Hyperframe
is.subset.owin

Determine Whether One Window is Contained In Another
intensity.ppp

Empirical Intensity of Point Pattern
dirichletWeights

Compute Quadrature Weights Based on Dirichlet Tessellation
intensity.ppx

Intensity of a Multidimensional Space-Time Point Pattern
intersect.tess

Intersection of Two Tessellations
multiplicity.ppp

Count Multiplicity of Duplicate Points
nearest.raster.point

Find Pixel Nearest to a Given Point
edges2triangles

List Triangles in a Graph
edges2vees

List Dihedral Triples in a Graph
edit.ppp

Invoke Text Editor on Spatial Data
invoke.metric

Perform Geometric Task using a Specified Metric
connected.ppp

Connected Components of a Point Pattern
is.linnet

Test Whether An Object Is A Linear Network
extrapolate.psp

Extrapolate Line Segments to Obtain Infinite Lines
eroded.areas

Areas of Morphological Erosions
erosion

Morphological Erosion by a Disc
nndist

Nearest neighbour distances
centroid.owin

Centroid of a window
harmonise.owin

Make Windows Compatible
is.lpp

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

Interactively Add Points
fardist

Farthest Distance to Boundary of Window
layout.boxes

Generate a Row or Column Arrangement of Rectangles.
nndist.pp3

Nearest neighbour distances in three dimensions
convexmetric

Distance Metric Defined by Convex Set
lengths_psp

Lengths of Line Segments
clip.infline

Intersect Infinite Straight Lines with a Window
gridcentres

Rectangular grid of points
harmoniseLevels

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

Take Complement of a Window
methods.box3

Methods for Three-Dimensional Box
concatxy

Concatenate x,y Coordinate Vectors
hextess

Hexagonal Grid or Tessellation
methods.boxx

Methods for Multi-Dimensional Box
convolve.im

Convolution of Pixel Images
gridweights

Compute Quadrature Weights Based on Grid Counts
convexhull.xy

Convex Hull of Points
im

Create a Pixel Image Object
crossdist.ppp

Pairwise distances between two different point patterns
nobjects

Count Number of Geometrical Objects in a Spatial Dataset
im.apply

Apply Function Pixelwise to List of Images
inside.boxx

Test Whether Points Are Inside A Multidimensional Box
nestsplit

Nested Split
inside.owin

Test Whether Points Are Inside A Window
is.connected

Determine Whether an Object is Connected
hist.funxy

Histogram of Values of a Spatial Function
convexify

Weil's Convexifying Operation
is.connected.ppp

Determine Whether a Point Pattern is Connected
is.convex

Test Whether a Window is Convex
cut.im

Convert Pixel Image from Numeric to Factor
npoints

Number of Points in a Point Pattern
is.empty

Test Whether An Object Is Empty
cut.ppp

Classify Points in a Point Pattern
is.owin

Test Whether An Object Is A Window
integral.im

Integral of a Pixel Image
intensity

Intensity of a Dataset or a Model
is.ppp

Test Whether An Object Is A Point Pattern
periodify

Make Periodic Copies of a Spatial Pattern
marks

Marks of a Point Pattern
dilated.areas

Areas of Morphological Dilations
crossdist.ppx

Pairwise Distances Between Two Different Multi-Dimensional Point Patterns
delaunayDistance

Distance on Delaunay Triangulation
persp.im

Perspective Plot of Pixel Image
deltametric

Delta Metric
is.marked

Test Whether Marks Are Present
nncross

Nearest Neighbours Between Two Patterns
plot.owin

Plot a Spatial Window
distmap.owin

Distance Map of Window
plot.pp3

Plot a Three-Dimensional Point Pattern
nnfun

Nearest Neighbour Index Map as a Function
marks.psp

Marks of a Line Segment Pattern
distmap.ppp

Distance Map of Point Pattern
dilation

Morphological Dilation
ellipse

Elliptical Window.
nnmap

K-th Nearest Point Map
methods.distfun

Geometrical Operations for Distance Functions
endpoints.psp

Endpoints of Line Segment Pattern
methods.funxy

Methods for Spatial Functions
pointsOnLines

Place Points Evenly Along Specified Lines
framedist.pixels

Distance to Bounding Frame
is.marked.ppp

Test Whether A Point Pattern is Marked
polartess

Tessellation Using Polar Coordinates
nncross.pp3

Nearest Neighbours Between Two Patterns in 3D
ppp.object

Class of Point Patterns
pppdist

Distance Between Two Point Patterns
grow.boxx

Add margins to box in any dimension
funxy

Spatial Function Class
grow.rectangle

Add margins to rectangle
pairdist.default

Pairwise distances
hist.im

Histogram of Pixel Values in an Image
harmonise

Make Objects Compatible
nncross.ppx

Nearest Neighbours Between Two Patterns in Any Dimensions
layered

Create List of Plotting Layers
nnmark

Mark of Nearest Neighbour
hyperframe

Hyper Data Frame
intersect.boxx

Intersection Of Boxes Of Arbitrary Dimension
harmonise.im

Make Pixel Images Compatible
intersect.owin

Intersection, Union or Set Subtraction of Windows
progressreport

Print Progress Reports
identify.ppp

Identify Points in a Point Pattern
is.im

Test Whether An Object Is A Pixel Image
layerplotargs

Extract or Replace the Plot Arguments of a Layered Object
is.linim

Test Whether an Object is a Pixel Image on a Linear Network
pairdist.pp3

Pairwise distances in Three Dimensions
pairdist.psp

Pairwise distances between line segments
nnwhich

Nearest neighbour
project2segment

Move Point To Nearest Line
perimeter

Perimeter Length of Window
owin

Create a Window
levelset

Level Set of a Pixel Image
lut

Lookup Tables
plot.imlist

Plot a List of Images
identify.psp

Identify Segments in a Line Segment Pattern
marks.tess

Marks of a Tessellation
quadscheme.logi

Generate a Logistic Regression Quadrature Scheme from a Point Pattern
owin.object

Class owin
plot.layered

Layered Plot
quantess

Quantile Tessellation
restrict.colourmap

Restrict a Colour Map to a Subset of Values
intensity.psp

Empirical Intensity of Line Segment Pattern
markstat

Summarise Marks in Every Neighbourhood in a Point Pattern
intensity.quadratcount

Intensity Estimates Using Quadrat Counts
persp.ppp

Perspective Plot of Marked Point Pattern
methods.ppx

Methods for Multidimensional Space-Time Point Patterns
plot.ppp

plot a Spatial Point Pattern
methods.unitname

Methods for Units
plot.pppmatching

Plot a Point Matching
matchingdist

Distance for a Point Pattern Matching
rexplode

Explode a Point Pattern by Displacing Duplicated Points
plot.splitppp

Plot a List of Point Patterns
nearestValue

Image of Nearest Defined Pixel Value
perspPoints

Draw Points or Lines on a Surface Viewed in Perspective
interp.colourmap

Interpolate smoothly between specified colours
interp.im

Interpolate a Pixel Image
rotate

Rotate
plot.anylist

Plot a List of Things
nearestsegment

Find Line Segment Nearest to Each Point
plot.colourmap

Plot a Colour Map
is.multitype

Test whether Object is Multitype
nnwhich.pp3

Nearest neighbours in three dimensions
nnwhich.ppx

Nearest Neighbours in Any Dimensions
plot.quadratcount

Plot Quadrat Counts
plot.solist

Plot a List of Spatial Objects
is.multitype.ppp

Test Whether A Point Pattern is Multitype
rotate.im

Rotate a Pixel Image
mean.im

Mean and Median of Pixel Values in an Image
runifrect

Generate N Uniform Random Points in a Rectangle
scalardilate

Apply Scalar Dilation
owin2mask

Convert Window to Binary Mask under Constraints
maxnndist

Compute Minimum or Maximum Nearest-Neighbour Distance
shift.owin

Apply Vector Translation To Window
pHcolourmap

Colour Map for pH Values
shift.ppp

Apply Vector Translation To Point Pattern
pairdist.ppp

Pairwise distances
mergeLevels

Merge Levels of a Factor
methods.layered

Methods for Layered Objects
methods.pp3

Methods for three-dimensional point patterns
solist

List of Two-Dimensional Spatial Objects
nndist.ppx

Nearest Neighbour Distances in Any Dimensions
nndist.psp

Nearest neighbour distances between line segments
pp3

Three Dimensional Point Pattern
metric.object

Distance Metric
midpoints.psp

Midpoints of Line Segment Pattern
opening

Morphological Opening
nsegments

Number of Line Segments in a Line Segment Pattern
ppp

Create a Point Pattern
ppx

Multidimensional Space-Time Point Pattern
print.im

Print Brief Details of an Image
nvertices

Count Number of Vertices
rescale.psp

Convert Line Segment Pattern to Another Unit of Length
plot.symbolmap

Plot a Graphics Symbol Map
padimage

Pad the Border of a Pixel Image
pairdist

Pairwise distances
pppmatching

Create a Point Matching
solutionset

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

Compute Area of Overlap
pairdist.ppx

Pairwise Distances in Any Dimensions
pppmatching.object

Class of Point Matchings
psp.object

Class of Line Segment Patterns
summary.listof

Summary of a List of Things
plot.hyperframe

Plot Entries in a Hyperframe
summary.owin

Summary of a Spatial Window
rescue.rectangle

Convert Window Back To Rectangle
plot.im

Plot a Pixel Image
rgbim

Create Colour-Valued Pixel Image
psp2mask

Convert Line Segment Pattern to Binary Pixel Mask
plot.psp

plot a Spatial Line Segment Pattern
plot.quad

Plot a Spatial Quadrature Scheme
ripras

Estimate window from points alone
scaletointerval

Rescale Data to Lie Between Specified Limits
pixelcentres

Extract Pixel Centres as Point Pattern
plot.tess

Plot a Tessellation
plot.textstring

Plot a Text String
pixellate

Convert Spatial Object to Pixel Image
symbolmap

Graphics Symbol Map
print.psp

Print Brief Details of a Line Segment Pattern Dataset
print.quad

Print a Quadrature Scheme
quantile.im

Sample Quantiles of Pixel Image
project2set

Find Nearest Point in a Region
pixellate.psp

Convert Line Segment Pattern to Pixel Image
pixelquad

Quadrature Scheme Based on Pixel Grid
scanpp

Read Point Pattern From Data File
quantilefun.im

Quantile Function for Images
tess

Create a Tessellation
rotate.infline

Rotate or Shift Infinite Lines
simplify.owin

Approximate a Polygon by a Simpler Polygon
psp

Create a Line Segment Pattern
reflect

Reflect In Origin
rotate.owin

Rotate a Window
round.ppp

Apply Numerical Rounding to Spatial Coordinates
rounding.ppp

Detect Numerical Rounding
pixellate.owin

Convert Window to Pixel Image
solapply

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

Print Names and Version Numbers of Libraries Loaded
timed

Record the Computation Time
transmat

Convert Pixel Array Between Different Conventions
square

Square Window
update.symbolmap

Update a Graphics Symbol Map.
pixellate.ppp

Convert Point Pattern to Pixel Image
venn.tess

Tessellation Delimited by Several Sets
print.owin

Print Brief Details of a Spatial Window
plot.listof

Plot a List of Things
setcov

Set Covariance of a Window
plot.onearrow

Plot an Arrow
spatstat.geom-internal

Internal spatstat.geom functions
regularpolygon

Create A Regular Polygon
spatstat.geom-package

The spatstat.geom Package
print.ppp

Print Brief Details of a Point Pattern Dataset
relevel.im

Reorder Levels of a Factor-Valued Image or Pattern
requireversion

Require a Specific Version of a Package
plot.texturemap

Plot a Texture Map
plot.yardstick

Plot a Yardstick or Scale Bar
rotate.ppp

Rotate a Point Pattern
quad.object

Class of Quadrature Schemes
rotate.psp

Rotate a Line Segment Pattern
quadratcount

Quadrat counting for a point pattern
subset.psp

Subset of Line Segment Satisfying A Condition
stratrand

Stratified random point pattern
selfcrossing.psp

Crossing Points in a Line Segment Pattern
selfcut.psp

Cut Line Segments Where They Intersect
summary.anylist

Summary of a List of Things
quasirandom

Quasirandom Patterns
shift.ppx

Apply Vector Translation To Box Or Point Pattern In Arbitrary Dimension
summary.quad

Summarizing a Quadrature Scheme
quadrats

Divide Region into Quadrats
shift.psp

Apply Vector Translation To Line Segment Pattern
rQuasi

Generate Quasirandom Point Pattern in Given Window
rescale

Convert dataset to another unit of length
spatstat.options

Internal Options in Spatstat Package
split.hyperframe

Divide Hyperframe Into Subsets and Reassemble
unstack.ppp

Separate Multiple Columns of Marks
summary.solist

Summary of a List of Spatial Objects
split.ppx

Divide Multidimensional Point Pattern into Sub-patterns
spokes

Spokes pattern of dummy points
quadscheme

Generate a Quadrature Scheme from a Point Pattern
trim.rectangle

Cut margins from rectangle
texturemap

Texture Map
rescale.im

Convert Pixel Image to Another Unit of Length
test.crossing.psp

Check Whether Segments Cross
rjitter

Random Perturbation of a Point Pattern
summary.distfun

Summarizing a Function of Spatial Location
raster.x

Cartesian Coordinates for a Pixel Raster
text.ppp

Add Text Labels to Spatial Pattern
textureplot

Plot Image or Tessellation Using Texture Fill
summary.im

Summarizing a Pixel Image
rectdistmap

Distance Map Using Rectangular Distance Metric
whichhalfplane

Test Which Side of Infinite Line a Point Falls On
unitname

Name for Unit of Length
triangulate.owin

Decompose Window into Triangles
rlinegrid

Generate grid of parallel lines with random displacement
tweak.colourmap

Change Colour Values in a Colour Map
rescale.owin

Convert Window to Another Unit of Length
unstack.solist

Unstack Each Spatial Object in a List of Objects
sidelengths.owin

Side Lengths of Enclosing Rectangle of a Window
simplepanel

Simple Point-and-Click Interface Panels
union.quad

Union of Data and Dummy Points
where.max

Find Location of Maximum in a Pixel Image
rescale.ppp

Convert Point Pattern to Another Unit of Length
rsyst

Simulate systematic random point pattern
run.simplepanel

Run Point-and-Click Interface
shift

Apply Vector Translation
yardstick

Text, Arrow or Scale Bar in a Diagram
shift.im

Apply Vector Translation To Pixel Image
unmark

Remove Marks
split.im

Divide Image Into Sub-images
spatdim

Spatial Dimension of a Dataset
with.hyperframe

Evaluate an Expression in Each Row of a Hyperframe
spatstat.geom-deprecated

Deprecated spatstat.geom functions
split.ppp

Divide Point Pattern into Sub-patterns
summary.splitppp

Summary of a Split Point Pattern
subset.hyperframe

Subset of Hyperframe Satisfying A Condition
superimpose

Superimpose Several Geometric Patterns
tile.areas

Compute Areas of Tiles in a Tessellation
tileindex

Determine Which Tile Contains Each Given Point
subset.ppp

Subset of Point Pattern Satisfying A Condition
unique.ppp

Extract Unique Points from a Spatial Point Pattern
uniquemap.ppp

Map Duplicate Entries to Unique Entries
summary.ppp

Summary of a Point Pattern Dataset
vertices

Vertices of a Window
volume

Volume of an Object
summary.psp

Summary of a Line Segment Pattern Dataset
tilenames

Names of Tiles in a Tessellation
tiles

Extract List of Tiles in a Tessellation
tiles.empty

Check For Empty Tiles in a Tessellation
timeTaken

Extract the Total Computation Time
zapsmall.im

Rounding of Pixel Values