Learn R Programming

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

spatstat.geom (version 2.2-2)

Geometrical Functionality of the 'spatstat' Family

Description

Defines types of spatial data such as point patterns, mainly in two dimensions, but also in higher dimensions. Provides class support, and functions for geometrical operations on spatial data, used in the 'spatstat' family of packages. Excludes spatial data on a linear network, which are covered by the separate package 'spatstat.linnet'.

Copy Link

Version

Install

install.packages('spatstat.geom')

Monthly Downloads

69,467

Version

2.2-2

License

GPL (>= 2)

Maintainer

Adrian Baddeley

Last Published

July 12th, 2021

Functions in spatstat.geom (2.2-2)

Extract.layered

Extract or Replace Subset of a Layered Object
Extract.quad

Subset of Quadrature Scheme
Extract.listof

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

Extract or Replace Subset of Hyperframe
Extract.psp

Extract Subset of Line Segment Pattern
Extract.im

Extract Subset of Image
Extract.ppp

Extract or Replace Subset of Point Pattern
Extract.anylist

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

Extract Subset of Multidimensional Point Pattern
Extract.splitppp

Extract or Replace Sub-Patterns
Math.im

S3 Group Generic methods for images
Extract.solist

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

S3 Group Generic methods for List of Images
Extract.owin

Extract Subset of Window
WindowOnly

Extract Window of Spatial Object
Window

Extract or Change the Window of a Spatial Object
add.texture

Fill Plot With Texture
affine

Apply Affine Transformation
Frame

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

Extract or Replace Subset of Tessellation
anyNA.im

Check Whether Image Contains NA Values
anylist

List of Objects
angles.psp

Orientation Angles of Line Segments
as.boxx

Convert Data to Multi-Dimensional Box
as.data.frame.hyperframe

Coerce Hyperframe to Data Frame
MinkowskiSum

Minkowski Sum of Windows
as.data.frame.owin

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

Convert Pixel Image to Data Frame
affine.tess

Apply Geometrical Transformation To Tessellation
Replace.im

Reset Values in Subset of Image
append.psp

Combine Two Line Segment Patterns
affine.ppp

Apply Affine Transformation To Point Pattern
affine.im

Apply Affine Transformation To Pixel Image
affine.owin

Apply Affine Transformation To Window
areaGain

Difference of Disc Areas
area.owin

Area of a Window
applynbd

Apply Function to Every Neighbourhood in a Point Pattern
as.hyperframe

Convert Data to Hyperframe
as.hyperframe.ppx

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

Convert Tessellation to Data Frame
as.function.im

Convert Pixel Image to Function of Coordinates
as.data.frame.psp

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

Coerce Point Pattern to a Data Frame
affine.psp

Apply Affine Transformation To Line Segment Pattern
as.function.tess

Convert a Tessellation to a Function
as.function.owin

Convert Window to Indicator Function
as.rectangle

Window Frame
as.solist

Convert List of Two-Dimensional Spatial Objects
as.box3

Convert Data to Three-Dimensional Box
as.layered

Convert Data To Layered Object
areaLoss

Difference of Disc Areas
as.im

Convert to Pixel Image
as.owin

Convert Data To Class owin
as.psp

Convert Data To Class psp
as.ppp

Convert Data To Class ppp
as.polygonal

Convert a Window to a Polygonal Window
as.mask

Pixel Image Approximation of a Window
as.mask.psp

Convert Line Segment Pattern to Binary Pixel Mask
bounding.box.xy

Convex Hull of Points
boundingbox

Bounding Box of a Window, Image, or Point Pattern
bdist.pixels

Distance to Boundary of Window
as.tess

Convert Data To Tessellation
chop.tess

Subdivide a Window or Tessellation using a Set of Lines
boxx

Multi-Dimensional Box
boundingcircle

Smallest Enclosing Circle
clickbox

Interactively Define a Rectangle
bufftess

Buffer Distance Tessellation
box3

Three-Dimensional Box
by.ppp

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

Apply Function to Image Broken Down by Factor
as.matrix.im

Convert Pixel Image to Matrix or Array
beachcolours

Create Colour Scheme for a Range of Numbers
as.matrix.owin

Convert Pixel Image to Matrix
bdist.points

Distance to Boundary of Window
clickdist

Interactively Measure Distance
closepairs.pp3

Close Pairs of Points in 3 Dimensions
closepairs

Close Pairs of Points
clickppp

Interactively Add Points
clip.infline

Intersect Infinite Straight Lines with a Window
centroid.owin

Centroid of a window
complement.owin

Take Complement of a Window
colouroutputs

Extract or Assign Colour Values in a Colour Map
cbind.hyperframe

Combine Hyperframes by Rows or by Columns
connected

Connected components
colourmap

Colour Lookup Tables
closetriples

Close Triples of Points
bdist.tiles

Distance to Boundary of Window
clickpoly

Interactively Define a Polygon
closing

Morphological Closing
compatible

Test Whether Objects Are Compatible
compatible.im

Test Whether Pixel Images Are Compatible
concatxy

Concatenate x,y Coordinate Vectors
crossdist.ppp

Pairwise distances between two different point patterns
contour.im

Contour plot of pixel image
convexify

Weil's Convexifying Operation
connected.tess

Connected Components of Tiles of a Tessellation
commonGrid

Determine A Common Spatial Domain And Pixel Resolution
crossdist.pp3

Pairwise distances between two different three-dimensional point patterns
colourtools

Convert and Compare Colours in Different Formats
crossdist

Pairwise distances
convexhull.xy

Convex Hull of Points
border

Border Region of a Window
connected.ppp

Connected Components of a Point Pattern
default.dummy

Generate a Default Pattern of Dummy Points
cut.ppp

Classify Points in a Point Pattern
deltametric

Delta Metric
delaunayDistance

Distance on Delaunay Triangulation
crossdist.default

Pairwise distances between two different sets of points
delaunay

Delaunay Triangulation of Point Pattern
contour.imlist

Array of Contour Plots
diameter

Diameter of an Object
convexhull

Convex Hull
convolve.im

Convolution of Pixel Images
corners

Corners of a rectangle
crossdist.ppx

Pairwise Distances Between Two Different Multi-Dimensional Point Patterns
covering

Cover Region with Discs
coords

Extract or Change Coordinates of a Spatial or Spatiotemporal Point Pattern
dilated.areas

Areas of Morphological Dilations
diameter.owin

Diameter of a Window
crossing.psp

Crossing Points of Two Line Segment Patterns
disc

Circular Window
cut.im

Convert Pixel Image from Numeric to Factor
dirichletWeights

Compute Quadrature Weights Based on Dirichlet Tessellation
diameter.box3

Geometrical Calculations for Three-Dimensional Box
dirichletAreas

Compute Areas of Tiles in Dirichlet Tessellation
diameter.boxx

Geometrical Calculations for Multi-Dimensional Box
distmap.ppp

Distance Map of Point Pattern
discretise

Safely Convert Point Pattern Window to Binary Mask
discpartarea

Area of Part of Disc
crossdist.psp

Pairwise distances between two different line segment patterns
distmap.psp

Distance Map of Line Segment Pattern
domain

Extract the Domain of any Spatial Object
duplicated.ppp

Determine Duplicated Points in a Spatial Point Pattern
dilation

Morphological Dilation
dirichlet

Dirichlet Tessellation of Point Pattern
distmap.owin

Distance Map of Window
endpoints.psp

Endpoints of Line Segment Pattern
distmap

Distance Map
eroded.areas

Areas of Morphological Erosions
edges2vees

List Dihedral Triples in a Graph
edit.hyperframe

Invoke Text Editor on Hyperframe
erosion

Morphological Erosion by a Disc
distfun

Distance Map as a Function
dirichletVertices

Vertices and Edges of Dirichlet Tessellation
edit.ppp

Invoke Text Editor on Spatial Data
discs

Union of Discs
ellipse

Elliptical Window.
gridweights

Compute Quadrature Weights Based on Grid Counts
extrapolate.psp

Extrapolate Line Segments to Obtain Infinite Lines
fardist

Farthest Distance to Boundary of Window
grow.boxx

Add margins to box in any dimension
harmonise.owin

Make Windows Compatible
harmonise.im

Make Pixel Images Compatible
grow.rectangle

Add margins to rectangle
harmonise

Make Objects Compatible
headtail

First or Last Part of a Spatial Pattern
funxy

Spatial Function Class
ewcdf

Weighted Empirical Cumulative Distribution Function
has.close

Check Whether Points Have Close Neighbours
edges2triangles

List Triangles in a Graph
edges

Extract Boundary Edges of a Window.
eval.im

Evaluate Expression Involving Pixel Images
gridcentres

Rectangular grid of points
hextess

Hexagonal Grid or Tessellation
erosionAny

Morphological Erosion of Windows
hist.funxy

Histogram of Values of a Spatial Function
fourierbasis

Fourier Basis Functions
flipxy

Exchange X and Y Coordinates
hotrod

Heat Kernel for a One-Dimensional Rod
hist.im

Histogram of Pixel Values in an Image
hyperframe

Hyper Data Frame
identify.ppp

Identify Points in a Point Pattern
inside.boxx

Test Whether Points Are Inside A Multidimensional Box
infline

Infinite Straight Lines
imcov

Spatial Covariance of a Pixel Image
incircle

Find Largest Circle Inside Window
intersect.boxx

Intersection Of Boxes Of Arbitrary Dimension
interp.im

Interpolate a Pixel Image
im.object

Class of Images
im.apply

Apply Function Pixelwise to List of Images
identify.psp

Identify Segments in a Line Segment Pattern
interp.colourmap

Interpolate smoothly between specified colours
im

Create a Pixel Image Object
intensity.quadratcount

Intensity Estimates Using Quadrat Counts
intensity

Intensity of a Dataset or a Model
intensity.ppp

Empirical Intensity of Point Pattern
inside.owin

Test Whether Points Are Inside A Window
intensity.psp

Empirical Intensity of Line Segment Pattern
intensity.ppx

Intensity of a Multidimensional Space-Time Point Pattern
integral.im

Integral of a Pixel Image
is.connected

Determine Whether an Object is Connected
is.lpp

Test Whether An Object Is A Point Pattern on a Linear Network
invoke.symbolmap

Plot Data Using Graphics Symbol Map
is.convex

Test Whether a Window is Convex
is.empty

Test Whether An Object Is Empty
is.im

Test Whether An Object Is A Pixel Image
is.connected.ppp

Determine Whether a Point Pattern is Connected
intersect.owin

Intersection, Union or Set Subtraction of Windows
is.linim

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

Intersection of Two Tessellations
is.multitype

Test whether Object is Multitype
layerplotargs

Extract or Replace the Plot Arguments of a Layered Object
layered

Create List of Plotting Layers
is.owin

Test Whether An Object Is A Window
is.ppp

Test Whether An Object Is A Point Pattern
is.subset.owin

Determine Whether One Window is Contained In Another
is.rectangle

Determine Type of Window
is.multitype.ppp

Test Whether A Point Pattern is Multitype
is.marked.ppp

Test Whether A Point Pattern is Marked
marks.tess

Marks of a Tessellation
is.marked

Test Whether Marks Are Present
levelset

Level Set of a Pixel Image
marks

Marks of a Point Pattern
markstat

Summarise Marks in Every Neighbourhood in a Point Pattern
maxnndist

Compute Minimum or Maximum Nearest-Neighbour Distance
matchingdist

Distance for a Point Pattern Matching
lut

Lookup Tables
methods.pp3

Methods for three-dimensional point patterns
marks.psp

Marks of a Line Segment Pattern
mergeLevels

Merge Levels of a Factor
mean.im

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

Methods for Layered Objects
methods.funxy

Methods for Spatial Functions
methods.distfun

Geometrical Operations for Distance Functions
layout.boxes

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

Methods for Multidimensional Space-Time Point Patterns
lengths_psp

Lengths of Line Segments
methods.box3

Methods for Three-Dimensional Box
methods.boxx

Methods for Multi-Dimensional Box
multiplicity.ppp

Count Multiplicity of Duplicate Points
midpoints.psp

Midpoints of Line Segment Pattern
nestsplit

Nested Split
nearestsegment

Find Line Segment Nearest to Each Point
methods.unitname

Methods for Units
nncross.ppx

Nearest Neighbours Between Two Patterns in Any Dimensions
nndist

Nearest neighbour distances
nearestValue

Image of Nearest Defined Pixel Value
nearest.raster.point

Find Pixel Nearest to a Given Point
nobjects

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

Nearest neighbour distances in three dimensions
nndist.ppx

Nearest Neighbour Distances in Any Dimensions
nncross

Nearest Neighbours Between Two Patterns
nncross.pp3

Nearest Neighbours Between Two Patterns in 3D
nnwhich.ppx

Nearest Neighbours in Any Dimensions
nndist.psp

Nearest neighbour distances between line segments
nnfun

Nearest Neighbour Index Map as a Function
nnwhich

Nearest neighbour
nsegments

Number of Line Segments in a Line Segment Pattern
npoints

Number of Points in a Point Pattern
padimage

Pad the Border of a Pixel Image
overlap.owin

Compute Area of Overlap
nnmap

K-th Nearest Point Map
pairdist.default

Pairwise distances
nnwhich.pp3

Nearest neighbours in three dimensions
pairdist

Pairwise distances
owin

Create a Window
nnmark

Mark of Nearest Neighbour
nvertices

Count Number of Vertices
periodify

Make Periodic Copies of a Spatial Pattern
pairdist.pp3

Pairwise distances in Three Dimensions
pixellate.owin

Convert Window to Pixel Image
pixellate

Convert Spatial Object to Pixel Image
pairdist.ppp

Pairwise distances
plot.anylist

Plot a List of Things
pixelquad

Quadrature Scheme Based on Pixel Grid
pairdist.ppx

Pairwise Distances in Any Dimensions
persp.im

Perspective Plot of Pixel Image
owin.object

Class owin
perspPoints

Draw Points or Lines on a Surface Viewed in Perspective
pixelcentres

Extract Pixel Centres as Point Pattern
opening

Morphological Opening
plot.colourmap

Plot a Colour Map
plot.hyperframe

Plot Entries in a Hyperframe
owin2mask

Convert Window to Binary Mask under Constraints
pixellate.psp

Convert Line Segment Pattern to Pixel Image
pixellate.ppp

Convert Point Pattern to Pixel Image
perimeter

Perimeter Length of Window
pairdist.psp

Pairwise distances between line segments
plot.im

Plot a Pixel Image
plot.imlist

Plot a List of Images
plot.pppmatching

Plot a Point Matching
plot.psp

plot a Spatial Line Segment Pattern
plot.quad

Plot a Spatial Quadrature Scheme
plot.quadratcount

Plot Quadrat Counts
plot.pp3

Plot a Three-Dimensional Point Pattern
plot.layered

Layered Plot
plot.ppp

plot a Spatial Point Pattern
plot.splitppp

Plot a List of Point Patterns
plot.solist

Plot a List of Spatial Objects
plot.listof

Plot a List of Things
pppdist

Distance Between Two Point Patterns
pppmatching

Create a Point Matching
quad.object

Class of Quadrature Schemes
quadratcount

Quadrat counting for a point pattern
quasirandom

Quasirandom Patterns
plot.textstring

Plot a Text String
plot.texturemap

Plot a Texture Map
rQuasi

Generate Quasirandom Point Pattern in Given Window
plot.yardstick

Plot a Yardstick or Scale Bar
rjitter

Random Perturbation of a Point Pattern
rescale.owin

Convert Window to Another Unit of Length
rescale.ppp

Convert Point Pattern to Another Unit of Length
plot.tess

Plot a Tessellation
plot.symbolmap

Plot a Graphics Symbol Map
pppmatching.object

Class of Point Matchings
pointsOnLines

Place Points Evenly Along Specified Lines
quadrats

Divide Region into Quadrats
quadscheme

Generate a Quadrature Scheme from a Point Pattern
ppx

Multidimensional Space-Time Point Pattern
psp

Create a Line Segment Pattern
plot.onearrow

Plot an Arrow
plot.owin

Plot a Spatial Window
ppp

Create a Point Pattern
regularpolygon

Create A Regular Polygon
psp.object

Class of Line Segment Patterns
rescale.psp

Convert Line Segment Pattern to Another Unit of Length
reflect

Reflect In Origin
print.owin

Print Brief Details of a Spatial Window
print.quad

Print a Quadrature Scheme
rlinegrid

Generate grid of parallel lines with random displacement
print.im

Print Brief Details of an Image
rotate.ppp

Rotate a Point Pattern
progressreport

Print Progress Reports
rotate.psp

Rotate a Line Segment Pattern
rescue.rectangle

Convert Window Back To Rectangle
split.hyperframe

Divide Hyperframe Into Subsets and Reassemble
spatstat.options

Internal Options in Spatstat Package
rescale.im

Convert Pixel Image to Another Unit of Length
rescale

Convert dataset to another unit of length
quadscheme.logi

Generate a Logistic Regression Quadrature Scheme from a Point Pattern
quantess

Quantile Tessellation
ppp.object

Class of Point Patterns
project2segment

Move Point To Nearest Line
project2set

Find Nearest Point in a Region
subset.hyperframe

Subset of Hyperframe Satisfying A Condition
rgbim

Create Colour-Valued Pixel Image
raster.x

Cartesian Coordinates for a Pixel Raster
ripras

Estimate window from points alone
runifrect

Generate N Uniform Random Points in a Rectangle
summary.listof

Summary of a List of Things
summary.owin

Summary of a Spatial Window
subset.ppp

Subset of Point Pattern Satisfying A Condition
sessionLibs

Print Names and Version Numbers of Libraries Loaded
rounding

Detect Numerical Rounding
setcov

Set Covariance of a Window
round.ppp

Apply Numerical Rounding to Spatial Coordinates
sidelengths.owin

Side Lengths of Enclosing Rectangle of a Window
simplepanel

Simple Point-and-Click Interface Panels
solist

List of Two-Dimensional Spatial Objects
scalardilate

Apply Scalar Dilation
solutionset

Evaluate Logical Expression Involving Pixel Images and Return Region Where Expression is True
polartess

Tessellation Using Polar Coordinates
shift.owin

Apply Vector Translation To Window
pp3

Three Dimensional Point Pattern
split.ppx

Divide Multidimensional Point Pattern into Sub-patterns
shift.ppp

Apply Vector Translation To Point Pattern
rectdistmap

Distance Map Using Rectangular Distance Metric
test.crossing.psp

Check Whether Segments Cross
spokes

Spokes pattern of dummy points
text.ppp

Add Text Labels to Spatial Pattern
requireversion

Require a Specific Version of a Package
texturemap

Texture Map
summary.distfun

Summarizing a Function of Spatial Location
rotate.infline

Rotate or Shift Infinite Lines
scaletointerval

Rescale Data to Lie Between Specified Limits
relevel.im

Reorder Levels of a Factor-Valued Image or Pattern
textureplot

Plot Image or Tessellation Using Texture Fill
vertices

Vertices of a Window
uniquemap.ppp

Map Duplicate Entries to Unique Entries
unitname

Name for Unit of Length
rotate.owin

Rotate a Window
summary.im

Summarizing a Pixel Image
with.hyperframe

Evaluate an Expression in Each Row of a Hyperframe
volume

Volume of an Object
yardstick

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

Print Brief Details of a Point Pattern Dataset
print.psp

Print Brief Details of a Line Segment Pattern Dataset
tiles

Extract List of Tiles in a Tessellation
tess

Create a Tessellation
symbolmap

Graphics Symbol Map
union.quad

Union of Data and Dummy Points
tilenames

Names of Tiles in a Tessellation
tweak.colourmap

Change Colour Values in a Colour Map
trim.rectangle

Cut margins from rectangle
update.symbolmap

Update a Graphics Symbol Map.
triangulate.owin

Decompose Window into Triangles
unmark

Remove Marks
unnormdensity

Weighted kernel smoother
rsyst

Simulate systematic random point pattern
venn.tess

Tessellation Delimited by Several Sets
spatstat.geom-internal

Internal spatstat.geom functions
shift.ppx

Apply Vector Translation To Box Or Point Pattern In Arbitrary Dimension
run.simplepanel

Run Point-and-Click Interface
shift.psp

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

The spatstat.geom Package
quantile.im

Sample Quantiles of Pixel Image
summary.splitppp

Summary of a Split Point Pattern
superimpose

Superimpose Several Geometric Patterns
quantile.ewcdf

Quantiles of Weighted Empirical Cumulative Distribution Function
scanpp

Read Point Pattern From Data File
solapply

Apply a Function Over a List and Obtain a List of Objects
simplify.owin

Approximate a Polygon by a Simpler Polygon
rotate

Rotate
zapsmall.im

Rounding of Pixel Values
selfcrossing.psp

Crossing Points in a Line Segment Pattern
spatdim

Spatial Dimension of a Dataset
spatstat.geom-deprecated

Deprecated spatstat.geom functions
shift

Apply Vector Translation
rotate.im

Rotate a Pixel Image
selfcut.psp

Cut Line Segments Where They Intersect
split.ppp

Divide Point Pattern into Sub-patterns
shift.im

Apply Vector Translation To Pixel Image
split.im

Divide Image Into Sub-images
square

Square Window
stratrand

Stratified random point pattern
summary.quad

Summarizing a Quadrature Scheme
tile.areas

Compute Areas of Tiles in a Tessellation
summary.anylist

Summary of a List of Things
summary.solist

Summary of a List of Spatial Objects
subset.psp

Subset of Line Segment Satisfying A Condition
summary.psp

Summary of a Line Segment Pattern Dataset
tileindex

Determine Which Tile Contains Each Given Point
summary.ppp

Summary of a Point Pattern Dataset
timeTaken

Extract the Total Computation Time
timed

Record the Computation Time
weighted.median

Weighted Median, Quantiles or Variance
transmat

Convert Pixel Array Between Different Conventions
tiles.empty

Check For Empty Tiles in a Tessellation
unique.ppp

Extract Unique Points from a Spatial Point Pattern
unstack.ppp

Separate Multiple Columns of Marks
uniquemap.default

Map Duplicate Entries to Unique Entries
where.max

Find Location of Maximum in a Pixel Image
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