Learn R Programming

spatstat.geom (version 3.3-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

51,396

Version

3.3-2

License

GPL (>= 2)

Maintainer

Last Published

July 15th, 2024

Functions in spatstat.geom (3.3-2)

Extract.anylist

Extract or Replace Subset of a List of Things
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
MinkowskiSum

Minkowski Sum of Windows
Extract.ppx

Extract Subset of Multidimensional Point Pattern
Replace.im

Reset Values in Subset of Image
affine.tess

Apply Geometrical Transformation To Tessellation
affine.im

Apply Affine Transformation To Pixel Image
Extract.im

Extract Subset of Image
Extract.hyperframe

Extract or Replace Subset of Hyperframe
affine.owin

Apply Affine Transformation To Window
Window

Extract or Change the Window of a Spatial Object
as.boxx

Convert Data to Multi-Dimensional Box
Window.tess

Extract Window of Spatial Object
as.colourmap

Convert to Colour Map
Extract.layered

Extract or Replace Subset of a Layered Object
Extract.solist

Extract or Replace Subset of a List of Spatial Objects
angles.psp

Orientation Angles of Line Segments
Extract.splitppp

Extract or Replace Sub-Patterns
as.layered

Convert Data To Layered Object
anyNA.im

Check Whether Image Contains NA Values
areaLoss

Difference of Disc Areas
as.mask

Pixel Image Approximation of a Window
anylist

List of Objects
as.box3

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

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

Convert Tessellation to Data Frame
area.owin

Area of a Window
areaGain

Difference of Disc Areas
as.data.frame.hyperframe

Coerce Hyperframe to Data Frame
as.hyperframe.ppx

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

Convert Pixel Image to Data Frame
as.function.tess

Convert a Tessellation to a Function
bounding.box.xy

Convex Hull of Points
boundingbox

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

Interactively Measure Distance
as.hyperframe

Convert Data to Hyperframe
clickpoly

Interactively Define a Polygon
as.matrix.im

Convert Pixel Image to Matrix or Array
as.im

Convert to Pixel Image
as.ppp

Convert Data To Class ppp
as.psp

Convert Data To Class psp
Extract.psp

Extract Subset of Line Segment Pattern
as.matrix.owin

Convert Pixel Image to Matrix
as.owin

Convert Data To Class owin
as.tess

Convert Data To Tessellation
bdist.pixels

Distance to Boundary of Window
closetriples

Close Triples of Points
cbind.hyperframe

Combine Hyperframes by Rows or by Columns
beachcolours

Create Colour Scheme for a Range of Numbers
as.polygonal

Convert a Window to a Polygonal Window
centroid.owin

Centroid of a window
colourtools

Convert and Compare Colours in Different Formats
bdist.points

Distance to Boundary of Window
bdist.tiles

Distance to Boundary of Window
Extract.tess

Extract or Replace Subset of Tessellation
Extract.quad

Subset of Quadrature Scheme
commonGrid

Determine A Common Spatial Domain And Pixel Resolution
border

Border Region of a Window
covering

Cover Region with Discs
chop.tess

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

S3 Group Generic methods for images
Math.imlist

S3 Group Generic methods for List of Images
Frame

Extract or Change the Containing Rectangle of a Spatial Object
closepairs

Close Pairs of Points
clickbox

Interactively Define a Rectangle
closepairs.pp3

Close Pairs of Points in 3 Dimensions
affine.ppp

Apply Affine Transformation To Point Pattern
crossdist

Pairwise distances
connected

Connected components
closing

Morphological Closing
cut.im

Convert Pixel Image from Numeric to Factor
contour.imlist

Array of Contour Plots
affine.psp

Apply Affine Transformation To Line Segment Pattern
add.texture

Fill Plot With Texture
connected.tess

Connected Components of Tiles of a Tessellation
contour.im

Contour plot of pixel image
coords

Extract or Change Coordinates of a Spatial or Spatiotemporal Point Pattern
convexhull

Convex Hull
as.data.frame.owin

Convert Window to Data Frame
cut.ppp

Classify Points in a Point Pattern
corners

Corners of a rectangle
convexhull.xy

Convex Hull of Points
crossdist.psp

Pairwise distances between two different line segment patterns
affine

Apply Affine Transformation
connected.ppp

Connected Components of a Point Pattern
as.data.frame.ppp

Coerce Point Pattern to a Data Frame
append.psp

Combine Two Line Segment Patterns
boundingcircle

Smallest Enclosing Circle
convexify

Weil's Convexifying Operation
applynbd

Apply Function to Every Neighbourhood in a Point Pattern
crossing.psp

Crossing Points of Two Line Segment Patterns
diameter.boxx

Geometrical Calculations for Multi-Dimensional Box
box3

Three-Dimensional Box
boxx

Multi-Dimensional Box
convexmetric

Distance Metric Defined by Convex Set
convolve.im

Convolution of Pixel Images
bufftess

Buffer Distance Tessellation
as.function.im

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

Convert Window to Indicator Function
default.dummy

Generate a Default Pattern of Dummy Points
colourmap

Colour Lookup Tables
diameter.owin

Diameter of a Window
crossdist.ppp

Pairwise distances between two different point patterns
default.symbolmap

Default Symbol Map for Plotting a Spatial Pattern
as.rectangle

Window Frame
crossdist.ppx

Pairwise Distances Between Two Different Multi-Dimensional Point Patterns
colouroutputs

Extract or Assign Colour Values in a Colour Map
complement.owin

Take Complement of a Window
dirichlet

Dirichlet Tessellation of Point Pattern
dirichletAreas

Compute Areas of Tiles in Dirichlet Tessellation
distfun

Distance Map as a Function
distmap

Distance Map
diameter

Diameter of an Object
distmap.psp

Distance Map of Line Segment Pattern
concatxy

Concatenate x,y Coordinate Vectors
default.symbolmap.ppp

Default Symbol Map for Point Pattern
as.solist

Convert List of Two-Dimensional Spatial Objects
dirichletVertices

Vertices and Edges of Dirichlet Tessellation
dirichletWeights

Compute Quadrature Weights Based on Dirichlet Tessellation
framedist.pixels

Distance to Bounding Frame
funxy

Spatial Function Class
diameter.box3

Geometrical Calculations for Three-Dimensional Box
by.im

Apply Function to Image Broken Down by Factor
discretise

Safely Convert Point Pattern Window to Binary Mask
discs

Union of Discs
by.ppp

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

Delaunay Triangulation of Point Pattern
disc

Circular Window
ellipse

Elliptical Window.
discpartarea

Area of Part of Disc
endpoints.psp

Endpoints of Line Segment Pattern
gridcentres

Rectangular grid of points
gridweights

Compute Quadrature Weights Based on Grid Counts
im.object

Class of Images
domain

Extract the Domain of any Spatial Object
clickppp

Interactively Add Points
edit.hyperframe

Invoke Text Editor on Hyperframe
imcov

Spatial Covariance of a Pixel Image
harmonise

Make Objects Compatible
delaunayDistance

Distance on Delaunay Triangulation
extrapolate.psp

Extrapolate Line Segments to Obtain Infinite Lines
edit.ppp

Invoke Text Editor on Spatial Data
harmonise.im

Make Pixel Images Compatible
deltametric

Delta Metric
fardist

Farthest Distance to Boundary of Window
integral.im

Integral of a Pixel Image
eroded.areas

Areas of Morphological Erosions
clip.infline

Intersect Infinite Straight Lines with a Window
duplicated.ppp

Determine Duplicated Points in a Spatial Point Pattern
has.close

Check Whether Points Have Close Neighbours
intensity.ppp

Empirical Intensity of Point Pattern
intensity.ppx

Intensity of a Multidimensional Space-Time Point Pattern
erosion

Morphological Erosion by a Disc
compatible

Test Whether Objects Are Compatible
edges

Extract Boundary Edges of a Window.
intersect.boxx

Intersection Of Boxes Of Arbitrary Dimension
hist.im

Histogram of Pixel Values in an Image
hyperframe

Hyper Data Frame
compatible.im

Test Whether Pixel Images Are Compatible
headtail

First or Last Part of a Spatial Pattern
intersect.owin

Intersection, Union or Set Subtraction of Windows
identify.ppp

Identify Points in a Point Pattern
flipxy

Exchange X and Y Coordinates
intensity

Intensity of a Dataset or a Model
is.im

Test Whether An Object Is A Pixel Image
identify.psp

Identify Segments in a Line Segment Pattern
fourierbasis

Fourier Basis Functions
intersect.tess

Intersection of Two Tessellations
is.connected

Determine Whether an Object is Connected
is.connected.ppp

Determine Whether a Point Pattern is Connected
invoke.metric

Perform Geometric Task using a Specified Metric
is.linnet

Test Whether An Object Is A Linear Network
is.marked

Test Whether Marks Are Present
is.marked.ppp

Test Whether A Point Pattern is Marked
crossdist.default

Pairwise distances between two different sets of points
intensity.psp

Empirical Intensity of Line Segment Pattern
is.linim

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

Intensity Estimates Using Quadrat Counts
harmonise.owin

Make Windows Compatible
layered

Create List of Plotting Layers
crossdist.pp3

Pairwise distances between two different three-dimensional point patterns
layerplotargs

Extract or Replace the Plot Arguments of a Layered Object
methods.box3

Methods for Three-Dimensional Box
is.convex

Test Whether a Window is Convex
methods.boxx

Methods for Multi-Dimensional Box
harmoniseLevels

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

Create a Pixel Image Object
is.empty

Test Whether An Object Is Empty
im.apply

Apply Function Pixelwise to List of Images
inside.boxx

Test Whether Points Are Inside A Multidimensional Box
dilated.areas

Areas of Morphological Dilations
dilation

Morphological Dilation
is.rectangle

Determine Type of Window
layout.boxes

Generate a Row or Column Arrangement of Rectangles.
lengths_psp

Lengths of Line Segments
marks.tess

Marks of a Tessellation
inside.owin

Test Whether Points Are Inside A Window
multiplicity.ppp

Count Multiplicity of Duplicate Points
distmap.owin

Distance Map of Window
is.lpp

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

Determine Whether One Window is Contained In Another
markstat

Summarise Marks in Every Neighbourhood in a Point Pattern
distmap.ppp

Distance Map of Point Pattern
is.owin

Test Whether An Object Is A Window
metric.object

Distance Metric
edges2triangles

List Triangles in a Graph
is.ppp

Test Whether An Object Is A Point Pattern
invoke.symbolmap

Plot Data Using Graphics Symbol Map
nearest.raster.point

Find Pixel Nearest to a Given Point
edges2vees

List Dihedral Triples in a Graph
nearestValue

Image of Nearest Defined Pixel Value
nncross.pp3

Nearest Neighbours Between Two Patterns in 3D
erosionAny

Morphological Erosion of Windows
eval.im

Evaluate Expression Involving Pixel Images
midpoints.psp

Midpoints of Line Segment Pattern
grow.boxx

Add margins to box in any dimension
mean.im

Mean and Median of Pixel Values in an Image
nndist

Nearest neighbour distances
is.boxx

Recognise a Multi-Dimensional Box
nncross.ppx

Nearest Neighbours Between Two Patterns in Any Dimensions
nearestsegment

Find Line Segment Nearest to Each Point
pairdist.default

Pairwise distances
grow.rectangle

Add margins to rectangle
pairdist.pp3

Pairwise distances in Three Dimensions
marks

Marks of a Point Pattern
mergeLevels

Merge Levels of a Factor
hextess

Hexagonal Grid or Tessellation
nndist.pp3

Nearest neighbour distances in three dimensions
hist.funxy

Histogram of Values of a Spatial Function
pairdist.psp

Pairwise distances between line segments
nsegments

Number of Line Segments in a Line Segment Pattern
nvertices

Count Number of Vertices
perimeter

Perimeter Length of Window
methods.layered

Methods for Layered Objects
marks.psp

Marks of a Line Segment Pattern
methods.pp3

Methods for three-dimensional point patterns
nnfun

Nearest Neighbour Index Map as a Function
methods.ppx

Methods for Multidimensional Space-Time Point Patterns
nestsplit

Nested Split
incircle

Find Largest Circle Inside Window
nnmap

K-th Nearest Point Map
opening

Morphological Opening
plot.im

Plot a Pixel Image
nncross

Nearest Neighbours Between Two Patterns
nnwhich.pp3

Nearest neighbours in three dimensions
padimage

Pad the Border of a Pixel Image
methods.unitname

Methods for Units
overlap.owin

Compute Area of Overlap
nndist.ppx

Nearest Neighbour Distances in Any Dimensions
pairdist

Pairwise distances
perspPoints

Draw Points or Lines on a Surface Viewed in Perspective
plot.imlist

Plot a List of Images
pixelcentres

Extract Pixel Centres as Point Pattern
infline

Infinite Straight Lines
nndist.psp

Nearest neighbour distances between line segments
plot.layered

Layered Plot
interp.colourmap

Interpolate smoothly between specified colours
nnwhich.ppx

Nearest Neighbours in Any Dimensions
plot.solist

Plot a List of Spatial Objects
interp.im

Interpolate a Pixel Image
plot.listof

Plot a List of Things
plot.splitppp

Plot a List of Point Patterns
nnmark

Mark of Nearest Neighbour
pppmatching.object

Class of Point Matchings
ppp

Create a Point Pattern
pairdist.ppp

Pairwise distances
pairdist.ppx

Pairwise Distances in Any Dimensions
is.multitype

Test whether Object is Multitype
nnwhich

Nearest neighbour
plot.colourmap

Plot a Colour Map
owin2mask

Convert Window to Binary Mask under Constraints
pHcolourmap

Colour Map for pH Values
is.multitype.ppp

Test Whether A Point Pattern is Multitype
ppp.object

Class of Point Patterns
levelset

Level Set of a Pixel Image
pppdist

Distance Between Two Point Patterns
plot.hyperframe

Plot Entries in a Hyperframe
lut

Lookup Tables
periodify

Make Periodic Copies of a Spatial Pattern
plot.pp3

Plot a Three-Dimensional Point Pattern
pixelquad

Quadrature Scheme Based on Pixel Grid
plot.ppp

plot a Spatial Point Pattern
pppmatching

Create a Point Matching
persp.im

Perspective Plot of Pixel Image
project2segment

Move Point To Nearest Line
matchingdist

Distance for a Point Pattern Matching
project2set

Find Nearest Point in a Region
plot.pppmatching

Plot a Point Matching
plot.anylist

Plot a List of Things
plot.quad

Plot a Spatial Quadrature Scheme
plot.psp

plot a Spatial Line Segment Pattern
ppx

Multidimensional Space-Time Point Pattern
maxnndist

Compute Minimum or Maximum Nearest-Neighbour Distance
methods.distfun

Geometrical Operations for Distance Functions
psp2mask

Convert Line Segment Pattern to Binary Pixel Mask
plot.yardstick

Plot a Yardstick or Scale Bar
plot.textstring

Plot a Text String
quantilefun.im

Quantile Function for Images
plot.quadratcount

Plot Quadrat Counts
plot.texturemap

Plot a Texture Map
methods.funxy

Methods for Spatial Functions
quasirandom

Quasirandom Patterns
pointsOnLines

Place Points Evenly Along Specified Lines
quadratcount

Quadrat counting for a point pattern
nobjects

Count Number of Geometrical Objects in a Spatial Dataset
plot.symbolmap

Plot a Graphics Symbol Map
npoints

Number of Points in a Point Pattern
quadrats

Divide Region into Quadrats
quad.object

Class of Quadrature Schemes
print.ppp

Print Brief Details of a Point Pattern Dataset
print.psp

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

Plot a Tessellation
rlinegrid

Generate grid of parallel lines with random displacement
owin

Create a Window
print.quad

Print a Quadrature Scheme
owin.object

Class owin
regularpolygon

Create A Regular Polygon
rotate

Rotate
relevel.im

Reorder Levels of a Factor-Valued Image or Pattern
quantess

Quantile Tessellation
rescale.im

Convert Pixel Image to Another Unit of Length
progressreport

Print Progress Reports
pixellate

Convert Spatial Object to Pixel Image
rescale.owin

Convert Window to Another Unit of Length
quantile.im

Sample Quantiles of Pixel Image
rexplode

Explode a Point Pattern by Displacing Duplicated Points
volume

Volume of an Object
rgbim

Create Colour-Valued Pixel Image
rotate.owin

Rotate a Window
pixellate.owin

Convert Window to Pixel Image
psp

Create a Line Segment Pattern
rotate.ppp

Rotate a Point Pattern
rounding.ppp

Detect Numerical Rounding
rsyst

Simulate systematic random point pattern
pixellate.ppp

Convert Point Pattern to Pixel Image
rQuasi

Generate Quasirandom Point Pattern in Given Window
psp.object

Class of Line Segment Patterns
rotate.psp

Rotate a Line Segment Pattern
reflect

Reflect In Origin
spatstat.geom-deprecated

Deprecated spatstat.geom functions
rectdistmap

Distance Map Using Rectangular Distance Metric
round.ppp

Apply Numerical Rounding to Spatial Coordinates
shift.psp

Apply Vector Translation To Line Segment Pattern
spatstat.geom-internal

Internal spatstat.geom functions
raster.x

Cartesian Coordinates for a Pixel Raster
sidelengths.owin

Side Lengths of Enclosing Rectangle of a Window
rescale.ppp

Convert Point Pattern to Another Unit of Length
pixellate.psp

Convert Line Segment Pattern to Pixel Image
plot.onearrow

Plot an Arrow
scalardilate

Apply Scalar Dilation
plot.owin

Plot a Spatial Window
shift.owin

Apply Vector Translation To Window
rescale.psp

Convert Line Segment Pattern to Another Unit of Length
selfcut.psp

Cut Line Segments Where They Intersect
scaletointerval

Rescale Data to Lie Between Specified Limits
shift

Apply Vector Translation
split.hyperframe

Divide Hyperframe Into Subsets and Reassemble
spokes

Spokes pattern of dummy points
sessionLibs

Print Names and Version Numbers of Libraries Loaded
polartess

Tessellation Using Polar Coordinates
requireversion

Require a Specific Version of a Package
scanpp

Read Point Pattern From Data File
rescale

Convert dataset to another unit of length
shift.ppp

Apply Vector Translation To Point Pattern
restrict.colourmap

Restrict a Colour Map to a Subset of Values
split.im

Divide Image Into Sub-images
square

Square Window
shift.ppx

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

Set Covariance of a Window
pp3

Three Dimensional Point Pattern
spatstat.geom-package

The spatstat.geom Package
split.ppp

Divide Point Pattern into Sub-patterns
ripras

Estimate window from points alone
yardstick

Text, Arrow or Scale Bar in a Diagram
solutionset

Evaluate Logical Expression Involving Pixel Images and Return Region Where Expression is True
split.ppx

Divide Multidimensional Point Pattern into Sub-patterns
superimpose

Superimpose Several Geometric Patterns
rjitter

Random Perturbation of a Point Pattern
spatdim

Spatial Dimension of a Dataset
summary.distfun

Summarizing a Function of Spatial Location
summary.anylist

Summary of a List of Things
stratrand

Stratified random point pattern
summary.im

Summarizing a Pixel Image
symbolmap

Graphics Symbol Map
text.ppp

Add Text Labels to Spatial Pattern
print.im

Print Brief Details of an Image
simplepanel

Simple Point-and-Click Interface Panels
subset.ppp

Subset of Point Pattern Satisfying A Condition
summary.listof

Summary of a List of Things
print.owin

Print Brief Details of a Spatial Window
selfcrossing.psp

Crossing Points in a Line Segment Pattern
tess

Create a Tessellation
whichhalfplane

Test Which Side of Infinite Line a Point Falls On
summary.quad

Summarizing a Quadrature Scheme
test.crossing.psp

Check Whether Segments Cross
texturemap

Texture Map
quadscheme

Generate a Quadrature Scheme from a Point Pattern
union.quad

Union of Data and Dummy Points
subset.hyperframe

Subset of Hyperframe Satisfying A Condition
textureplot

Plot Image or Tessellation Using Texture Fill
tile.areas

Compute Areas of Tiles in a Tessellation
quadscheme.logi

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

Rotate a Pixel Image
trim.rectangle

Cut margins from rectangle
rescue.rectangle

Convert Window Back To Rectangle
unique.ppp

Extract Unique Points from a Spatial Point Pattern
summary.owin

Summary of a Spatial Window
tileindex

Determine Which Tile Contains Each Given Point
shift.im

Apply Vector Translation To Pixel Image
tweak.colourmap

Change Colour Values in a Colour Map
rotate.infline

Rotate or Shift Infinite Lines
summary.psp

Summary of a Line Segment Pattern Dataset
with.hyperframe

Evaluate an Expression in Each Row of a Hyperframe
unstack.solist

Unstack Each Spatial Object in a List of Objects
update.symbolmap

Update a Graphics Symbol Map.
run.simplepanel

Run Point-and-Click Interface
spatstat.options

Internal Options in Spatstat Package
tiles

Extract List of Tiles in a Tessellation
tiles.empty

Check For Empty Tiles in a Tessellation
runifrect

Generate N Uniform Random Points in a Rectangle
unmark

Remove Marks
subset.psp

Subset of Line Segment Satisfying A Condition
simplify.owin

Approximate a Polygon by a Simpler Polygon
transmat

Convert Pixel Array Between Different Conventions
uniquemap.ppp

Map Duplicate Entries to Unique Entries
solapply

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

Summary of a List of Spatial Objects
solist

List of Two-Dimensional Spatial Objects
summary.ppp

Summary of a Point Pattern Dataset
summary.splitppp

Summary of a Split Point Pattern
triangulate.owin

Decompose Window into Triangles
venn.tess

Tessellation Delimited by Several Sets
zapsmall.im

Rounding of Pixel Values
unitname

Name for Unit of Length
tilenames

Names of Tiles in a Tessellation
timed

Record the Computation Time
vertices

Vertices of a Window
timeTaken

Extract the Total Computation Time
unstack.ppp

Separate Multiple Columns of Marks
where.max

Find Location of Maximum in a Pixel Image