Learn R Programming

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

spatstat.geom (version 2.3-0)

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

79,548

Version

2.3-0

License

GPL (>= 2)

Maintainer

Adrian Baddeley

Last Published

October 9th, 2021

Functions in spatstat.geom (2.3-0)

Extract.psp

Extract Subset of Line Segment Pattern
Math.imlist

S3 Group Generic methods for List of Images
add.texture

Fill Plot With Texture
affine

Apply Affine Transformation
Extract.ppx

Extract Subset of Multidimensional Point Pattern
affine.im

Apply Affine Transformation To Pixel Image
Extract.ppp

Extract or Replace Subset of Point Pattern
as.data.frame.owin

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

Convert Pixel Image to Data Frame
affine.owin

Apply Affine Transformation To Window
as.data.frame.psp

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

Coerce Point Pattern to a Data Frame
areaLoss

Difference of Disc Areas
as.box3

Convert Data to Three-Dimensional Box
Extract.hyperframe

Extract or Replace Subset of Hyperframe
Extract.anylist

Extract or Replace Subset of a List of Things
as.layered

Convert Data To Layered Object
as.im

Convert to Pixel Image
Window

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

Convert Data To Class owin
as.tess

Convert Data To Tessellation
as.polygonal

Convert a Window to a Polygonal Window
affine.ppp

Apply Affine Transformation To Point Pattern
WindowOnly

Extract Window of Spatial Object
clickppp

Interactively Add Points
clickpoly

Interactively Define a Polygon
clickdist

Interactively Measure Distance
applynbd

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

Combine Two Line Segment Patterns
bdist.pixels

Distance to Boundary of Window
boxx

Multi-Dimensional Box
affine.psp

Apply Affine Transformation To Line Segment Pattern
Extract.solist

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

Extract or Replace Sub-Patterns
clip.infline

Intersect Infinite Straight Lines with a Window
as.boxx

Convert Data to Multi-Dimensional Box
anylist

List of Objects
as.data.frame.hyperframe

Coerce Hyperframe to Data Frame
as.data.frame.tess

Convert Tessellation to Data Frame
anyNA.im

Check Whether Image Contains NA Values
contour.im

Contour plot of pixel image
bufftess

Buffer Distance Tessellation
as.hyperframe

Convert Data to Hyperframe
connected.tess

Connected Components of Tiles of a Tessellation
crossdist.pp3

Pairwise distances between two different three-dimensional point patterns
crossdist.default

Pairwise distances between two different sets of points
crossdist.ppx

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

Pairwise distances between two different point patterns
diameter.boxx

Geometrical Calculations for Multi-Dimensional Box
bdist.points

Distance to Boundary of Window
as.matrix.im

Convert Pixel Image to Matrix or Array
as.function.im

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

Convert Pixel Image to Matrix
colourmap

Colour Lookup Tables
as.mask

Pixel Image Approximation of a Window
colouroutputs

Extract or Assign Colour Values in a Colour Map
crossdist.psp

Pairwise distances between two different line segment patterns
as.hyperframe.ppx

Extract coordinates and marks of multidimensional point pattern
crossing.psp

Crossing Points of Two Line Segment Patterns
dilated.areas

Areas of Morphological Dilations
as.mask.psp

Convert Line Segment Pattern to Binary Pixel Mask
dilation

Morphological Dilation
beachcolours

Create Colour Scheme for a Range of Numbers
border

Border Region of a Window
ellipse

Elliptical Window.
distmap.owin

Distance Map of Window
diameter.owin

Diameter of a Window
distmap.ppp

Distance Map of Point Pattern
endpoints.psp

Endpoints of Line Segment Pattern
disc

Circular Window
by.im

Apply Function to Image Broken Down by Factor
by.ppp

Apply a Function to a Point Pattern Broken Down by Factor
bdist.tiles

Distance to Boundary of Window
clickbox

Interactively Define a Rectangle
compatible

Test Whether Objects Are Compatible
chop.tess

Subdivide a Window or Tessellation using a Set of Lines
convexhull.xy

Convex Hull of Points
compatible.im

Test Whether Pixel Images Are Compatible
closetriples

Close Triples of Points
contour.imlist

Array of Contour Plots
convexify

Weil's Convexifying Operation
convexhull

Convex Hull
edit.hyperframe

Invoke Text Editor on Hyperframe
edit.ppp

Invoke Text Editor on Spatial Data
discpartarea

Area of Part of Disc
closing

Morphological Closing
fourierbasis

Fourier Basis Functions
Extract.listof

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

Extract Subset of Window
as.function.owin

Convert Window to Indicator Function
Frame

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

Extract or Replace Subset of Tessellation
delaunayDistance

Distance on Delaunay Triangulation
deltametric

Delta Metric
extrapolate.psp

Extrapolate Line Segments to Obtain Infinite Lines
as.ppp

Convert Data To Class ppp
ewcdf

Weighted Empirical Cumulative Distribution Function
as.function.tess

Convert a Tessellation to a Function
fardist

Farthest Distance to Boundary of Window
flipxy

Exchange X and Y Coordinates
convexmetric

Distance Metric Defined by Convex Set
grow.boxx

Add margins to box in any dimension
as.psp

Convert Data To Class psp
incircle

Find Largest Circle Inside Window
harmonise

Make Objects Compatible
grow.rectangle

Add margins to rectangle
infline

Infinite Straight Lines
integral.im

Integral of a Pixel Image
intensity

Intensity of a Dataset or a Model
boundingcircle

Smallest Enclosing Circle
levelset

Level Set of a Pixel Image
is.marked

Test Whether Marks Are Present
intersect.owin

Intersection, Union or Set Subtraction of Windows
intersect.boxx

Intersection Of Boxes Of Arbitrary Dimension
is.marked.ppp

Test Whether A Point Pattern is Marked
colourtools

Convert and Compare Colours in Different Formats
box3

Three-Dimensional Box
commonGrid

Determine A Common Spatial Domain And Pixel Resolution
funxy

Spatial Function Class
Extract.layered

Extract or Replace Subset of a Layered Object
Extract.im

Extract Subset of Image
Replace.im

Reset Values in Subset of Image
MinkowskiSum

Minkowski Sum of Windows
lut

Lookup Tables
headtail

First or Last Part of a Spatial Pattern
complement.owin

Take Complement of a Window
convolve.im

Convolution of Pixel Images
default.dummy

Generate a Default Pattern of Dummy Points
area.owin

Area of a Window
affine.tess

Apply Geometrical Transformation To Tessellation
areaGain

Difference of Disc Areas
as.rectangle

Window Frame
angles.psp

Orientation Angles of Line Segments
as.solist

Convert List of Two-Dimensional Spatial Objects
delaunay

Delaunay Triangulation of Point Pattern
hextess

Hexagonal Grid or Tessellation
im

Create a Pixel Image Object
inside.boxx

Test Whether Points Are Inside A Multidimensional Box
im.apply

Apply Function Pixelwise to List of Images
harmonise.im

Make Pixel Images Compatible
bounding.box.xy

Convex Hull of Points
closepairs.pp3

Close Pairs of Points in 3 Dimensions
closepairs

Close Pairs of Points
centroid.owin

Centroid of a window
cbind.hyperframe

Combine Hyperframes by Rows or by Columns
boundingbox

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

Heat Kernel for a One-Dimensional Rod
inside.owin

Test Whether Points Are Inside A Window
hyperframe

Hyper Data Frame
intensity.ppx

Intensity of a Multidimensional Space-Time Point Pattern
is.empty

Test Whether An Object Is Empty
is.im

Test Whether An Object Is A Pixel Image
is.subset.owin

Determine Whether One Window is Contained In Another
intensity.ppp

Empirical Intensity of Point Pattern
matchingdist

Distance for a Point Pattern Matching
is.rectangle

Determine Type of Window
connected

Connected components
concatxy

Concatenate x,y Coordinate Vectors
layered

Create List of Plotting Layers
dirichletWeights

Compute Quadrature Weights Based on Dirichlet Tessellation
dirichletVertices

Vertices and Edges of Dirichlet Tessellation
distmap.psp

Distance Map of Line Segment Pattern
domain

Extract the Domain of any Spatial Object
connected.ppp

Connected Components of a Point Pattern
corners

Corners of a rectangle
coords

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

Dirichlet Tessellation of Point Pattern
maxnndist

Compute Minimum or Maximum Nearest-Neighbour Distance
nncross.ppx

Nearest Neighbours Between Two Patterns in Any Dimensions
nndist

Nearest neighbour distances
multiplicity.ppp

Count Multiplicity of Duplicate Points
midpoints.psp

Midpoints of Line Segment Pattern
erosionAny

Morphological Erosion of Windows
layerplotargs

Extract or Replace the Plot Arguments of a Layered Object
duplicated.ppp

Determine Duplicated Points in a Spatial Point Pattern
edges

Extract Boundary Edges of a Window.
nearestsegment

Find Line Segment Nearest to Each Point
hist.funxy

Histogram of Values of a Spatial Function
eval.im

Evaluate Expression Involving Pixel Images
nestsplit

Nested Split
npoints

Number of Points in a Point Pattern
nndist.pp3

Nearest neighbour distances in three dimensions
overlap.owin

Compute Area of Overlap
owin

Create a Window
nndist.ppx

Nearest Neighbour Distances in Any Dimensions
nsegments

Number of Line Segments in a Line Segment Pattern
dirichletAreas

Compute Areas of Tiles in Dirichlet Tessellation
discs

Union of Discs
discretise

Safely Convert Point Pattern Window to Binary Mask
covering

Cover Region with Discs
cut.im

Convert Pixel Image from Numeric to Factor
crossdist

Pairwise distances
pairdist.psp

Pairwise distances between line segments
methods.boxx

Methods for Multi-Dimensional Box
nnwhich.ppx

Nearest Neighbours in Any Dimensions
padimage

Pad the Border of a Pixel Image
nobjects

Count Number of Geometrical Objects in a Spatial Dataset
methods.distfun

Geometrical Operations for Distance Functions
cut.ppp

Classify Points in a Point Pattern
pixelquad

Quadrature Scheme Based on Pixel Grid
pairdist

Pairwise distances
plot.anylist

Plot a List of Things
hist.im

Histogram of Pixel Values in an Image
imcov

Spatial Covariance of a Pixel Image
im.object

Class of Images
interp.colourmap

Interpolate smoothly between specified colours
distfun

Distance Map as a Function
diameter

Diameter of an Object
diameter.box3

Geometrical Calculations for Three-Dimensional Box
edges2triangles

List Triangles in a Graph
interp.im

Interpolate a Pixel Image
gridcentres

Rectangular grid of points
gridweights

Compute Quadrature Weights Based on Grid Counts
edges2vees

List Dihedral Triples in a Graph
pixellate

Convert Spatial Object to Pixel Image
plot.onearrow

Plot an Arrow
plot.texturemap

Plot a Texture Map
plot.owin

Plot a Spatial Window
perimeter

Perimeter Length of Window
plot.textstring

Plot a Text String
pixellate.owin

Convert Window to Pixel Image
ppp

Create a Point Pattern
ppp.object

Class of Point Patterns
invoke.symbolmap

Plot Data Using Graphics Symbol Map
psp

Create a Line Segment Pattern
identify.psp

Identify Segments in a Line Segment Pattern
identify.ppp

Identify Points in a Point Pattern
intersect.tess

Intersection of Two Tessellations
psp.object

Class of Line Segment Patterns
pairdist.pp3

Pairwise distances in Three Dimensions
invoke.metric

Perform Geometric Task using a Specified Metric
pairdist.default

Pairwise distances
is.linim

Test Whether an Object is a Pixel Image on a Linear Network
plot.layered

Layered Plot
is.lpp

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

Marks of a Point Pattern
methods.unitname

Methods for Units
metric.object

Distance Metric
marks.psp

Marks of a Line Segment Pattern
is.connected

Determine Whether an Object is Connected
mean.im

Mean and Median of Pixel Values in an Image
quantile.ewcdf

Quantiles of Weighted Empirical Cumulative Distribution Function
mean.ewcdf

Mean of Empirical Cumulative Distribution Function
is.multitype

Test whether Object is Multitype
quantile.im

Sample Quantiles of Pixel Image
rescale.owin

Convert Window to Another Unit of Length
rotate.owin

Rotate a Window
rescale.ppp

Convert Point Pattern to Another Unit of Length
rotate.infline

Rotate or Shift Infinite Lines
run.simplepanel

Run Point-and-Click Interface
rsyst

Simulate systematic random point pattern
perspPoints

Draw Points or Lines on a Surface Viewed in Perspective
project2segment

Move Point To Nearest Line
pixelcentres

Extract Pixel Centres as Point Pattern
plot.listof

Plot a List of Things
selfcut.psp

Cut Line Segments Where They Intersect
is.multitype.ppp

Test Whether A Point Pattern is Multitype
plot.pppmatching

Plot a Point Matching
selfcrossing.psp

Crossing Points in a Line Segment Pattern
quadrats

Divide Region into Quadrats
marks.tess

Marks of a Tessellation
erosion

Morphological Erosion by a Disc
eroded.areas

Areas of Morphological Erosions
distmap

Distance Map
harmonise.owin

Make Windows Compatible
nearest.raster.point

Find Pixel Nearest to a Given Point
markstat

Summarise Marks in Every Neighbourhood in a Point Pattern
methods.funxy

Methods for Spatial Functions
polartess

Tessellation Using Polar Coordinates
nnfun

Nearest Neighbour Index Map as a Function
methods.layered

Methods for Layered Objects
nndist.psp

Nearest neighbour distances between line segments
nnwhich

Nearest neighbour
scalardilate

Apply Scalar Dilation
solist

List of Two-Dimensional Spatial Objects
pp3

Three Dimensional Point Pattern
nnmap

K-th Nearest Point Map
nearestValue

Image of Nearest Defined Pixel Value
has.close

Check Whether Points Have Close Neighbours
plot.psp

plot a Spatial Line Segment Pattern
nnmark

Mark of Nearest Neighbour
pairdist.ppp

Pairwise distances
pppmatching.object

Class of Point Matchings
shift

Apply Vector Translation
solutionset

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

Generate N Uniform Random Points in a Rectangle
print.psp

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

Print Brief Details of a Point Pattern Dataset
quad.object

Class of Quadrature Schemes
quadratcount

Quadrat counting for a point pattern
intensity.psp

Empirical Intensity of Line Segment Pattern
plot.colourmap

Plot a Colour Map
plot.hyperframe

Plot Entries in a Hyperframe
pairdist.ppx

Pairwise Distances in Any Dimensions
scaletointerval

Rescale Data to Lie Between Specified Limits
project2set

Find Nearest Point in a Region
rescale.psp

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

Convert Pixel Image to Another Unit of Length
rescale

Convert dataset to another unit of length
ppx

Multidimensional Space-Time Point Pattern
summary.distfun

Summarizing a Function of Spatial Location
rescue.rectangle

Convert Window Back To Rectangle
nnwhich.pp3

Nearest neighbours in three dimensions
texturemap

Texture Map
requireversion

Require a Specific Version of a Package
intensity.quadratcount

Intensity Estimates Using Quadrat Counts
square

Square Window
relevel.im

Reorder Levels of a Factor-Valued Image or Pattern
shift.im

Apply Vector Translation To Pixel Image
stratrand

Stratified random point pattern
quadscheme

Generate a Quadrature Scheme from a Point Pattern
textureplot

Plot Image or Tessellation Using Texture Fill
trim.rectangle

Cut margins from rectangle
plot.symbolmap

Plot a Graphics Symbol Map
owin.object

Class owin
periodify

Make Periodic Copies of a Spatial Pattern
owin2mask

Convert Window to Binary Mask under Constraints
tiles

Extract List of Tiles in a Tessellation
summary.im

Summarizing a Pixel Image
tileindex

Determine Which Tile Contains Each Given Point
plot.pp3

Plot a Three-Dimensional Point Pattern
persp.im

Perspective Plot of Pixel Image
tile.areas

Compute Areas of Tiles in a Tessellation
tweak.colourmap

Change Colour Values in a Colour Map
uniquemap.ppp

Map Duplicate Entries to Unique Entries
uniquemap.default

Map Duplicate Entries to Unique Entries
is.connected.ppp

Determine Whether a Point Pattern is Connected
unnormdensity

Weighted kernel smoother
whist

Weighted Histogram
unstack.ppp

Separate Multiple Columns of Marks
yardstick

Text, Arrow or Scale Bar in a Diagram
tilenames

Names of Tiles in a Tessellation
is.owin

Test Whether An Object Is A Window
is.convex

Test Whether a Window is Convex
is.ppp

Test Whether An Object Is A Point Pattern
plot.tess

Plot a Tessellation
print.quad

Print a Quadrature Scheme
pointsOnLines

Place Points Evenly Along Specified Lines
plot.yardstick

Plot a Yardstick or Scale Bar
with.hyperframe

Evaluate an Expression in Each Row of a Hyperframe
zapsmall.im

Rounding of Pixel Values
plot.quad

Plot a Spatial Quadrature Scheme
plot.quadratcount

Plot Quadrat Counts
print.im

Print Brief Details of an Image
plot.ppp

plot a Spatial Point Pattern
test.crossing.psp

Check Whether Segments Cross
scanpp

Read Point Pattern From Data File
quasirandom

Quasirandom Patterns
spatdim

Spatial Dimension of a Dataset
layout.boxes

Generate a Row or Column Arrangement of Rectangles.
split.hyperframe

Divide Hyperframe Into Subsets and Reassemble
print.owin

Print Brief Details of a Spatial Window
progressreport

Print Progress Reports
sidelengths.owin

Side Lengths of Enclosing Rectangle of a Window
shift.psp

Apply Vector Translation To Line Segment Pattern
shift.ppx

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

Divide Multidimensional Point Pattern into Sub-patterns
methods.ppx

Methods for Multidimensional Space-Time Point Patterns
lengths_psp

Lengths of Line Segments
mergeLevels

Merge Levels of a Factor
rounding

Detect Numerical Rounding
rQuasi

Generate Quasirandom Point Pattern in Given Window
quadscheme.logi

Generate a Logistic Regression Quadrature Scheme from a Point Pattern
spokes

Spokes pattern of dummy points
simplepanel

Simple Point-and-Click Interface Panels
quantess

Quantile Tessellation
raster.x

Cartesian Coordinates for a Pixel Raster
rectdistmap

Distance Map Using Rectangular Distance Metric
rjitter

Random Perturbation of a Point Pattern
rlinegrid

Generate grid of parallel lines with random displacement
round.ppp

Apply Numerical Rounding to Spatial Coordinates
rotate

Rotate
summary.ppp

Summary of a Point Pattern Dataset
rotate.im

Rotate a Pixel Image
simplify.owin

Approximate a Polygon by a Simpler Polygon
setcov

Set Covariance of a Window
summary.psp

Summary of a Line Segment Pattern Dataset
summary.owin

Summary of a Spatial Window
methods.box3

Methods for Three-Dimensional Box
symbolmap

Graphics Symbol Map
union.quad

Union of Data and Dummy Points
plot.im

Plot a Pixel Image
venn.tess

Tessellation Delimited by Several Sets
sessionLibs

Print Names and Version Numbers of Libraries Loaded
solapply

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

Create a Tessellation
vertices

Vertices of a Window
unique.ppp

Extract Unique Points from a Spatial Point Pattern
spatstat.geom-deprecated

Deprecated spatstat.geom functions
spatstat.options

Internal Options in Spatstat Package
methods.pp3

Methods for three-dimensional point patterns
timed

Record the Computation Time
split.im

Divide Image Into Sub-images
text.ppp

Add Text Labels to Spatial Pattern
unitname

Name for Unit of Length
nncross.pp3

Nearest Neighbours Between Two Patterns in 3D
summary.listof

Summary of a List of Things
pixellate.psp

Convert Line Segment Pattern to Pixel Image
split.ppp

Divide Point Pattern into Sub-patterns
transformquantiles

Transform the Quantiles
unmark

Remove Marks
summary.quad

Summarizing a Quadrature Scheme
volume

Volume of an Object
triangulate.owin

Decompose Window into Triangles
update.symbolmap

Update a Graphics Symbol Map.
transmat

Convert Pixel Array Between Different Conventions
summary.splitppp

Summary of a Split Point Pattern
superimpose

Superimpose Several Geometric Patterns
summary.solist

Summary of a List of Spatial Objects
unstack.solist

Unstack Each Spatial Object in a List of Objects
weighted.median

Weighted Median, Quantiles or Variance
nncross

Nearest Neighbours Between Two Patterns
opening

Morphological Opening
pixellate.ppp

Convert Point Pattern to Pixel Image
nvertices

Count Number of Vertices
plot.solist

Plot a List of Spatial Objects
reflect

Reflect In Origin
plot.splitppp

Plot a List of Point Patterns
shift.owin

Apply Vector Translation To Window
plot.imlist

Plot a List of Images
pppmatching

Create a Point Matching
pppdist

Distance Between Two Point Patterns
rgbim

Create Colour-Valued Pixel Image
where.max

Find Location of Maximum in a Pixel Image
regularpolygon

Create A Regular Polygon
rotate.ppp

Rotate a Point Pattern
spatstat.geom-internal

Internal spatstat.geom functions
ripras

Estimate window from points alone
rotate.psp

Rotate a Line Segment Pattern
whichhalfplane

Test Which Side of Infinite Line a Point Falls On
spatstat.geom-package

The spatstat.geom Package
subset.hyperframe

Subset of Hyperframe Satisfying A Condition
subset.psp

Subset of Line Segment Satisfying A Condition
shift.ppp

Apply Vector Translation To Point Pattern
summary.anylist

Summary of a List of Things
timeTaken

Extract the Total Computation Time
subset.ppp

Subset of Point Pattern Satisfying A Condition
tiles.empty

Check For Empty Tiles in a Tessellation
Extract.quad

Subset of Quadrature Scheme
Math.im

S3 Group Generic methods for images