SpatialPointData
✖
SpatialPointData
represents the spatial point collection {p1,p2,…} with associated values {data1,data2,…}.
represents multiple collections of spatial points with annotations.
Details and Options




- Spatial point collections are also known as spatial point patterns.
- A spatial point configuration is a collection of points, together with the observation region reg and optional annotations for each point.
- Point configurations can be in any dimension. Typical 1D points are events in time such as customer arrivals or server job arrivals. Typical 2D points are locations of cells in a sample, tree locations, crime or disease locations, etc. Typical 3D points are locations of stars and galaxy clusters or locations of aggregates in concrete, or locations of defects in materials.
-
- The points points can have the following forms:
-
{p1,p2,…} geometric points pi∈d GeoPosition[…],GeoPositionXYZ[…],… geographic points - The observation region reg is important if correct statistics are to be generated about the point configuration.
-
- If the observation region reg is not given, a region is automatically computed using RipleyRassonRegion.
- The observation region reg should be a parameter-free, full-dimensional and bounded region as tested by SpatialObservationRegionQ.
- Spatial points can also come with annotations that provide additional information related to each point. These are usually termed marks and covariates.
- Typical marks include tree diameter at breast height and tree species, and a typical covariate would be elevation in the case of trees.
- Annotation properties include:
-
"Annotations" annotations for the first point configuration {"Annotations",n} annotations for the nth point configuration "AnnotationsList" list of annotations for all point configurations {…,"key"} returns annotations with the given key "key" - Annotations can be retrieved and added using functions like AnnotationKeys, Annotate, AnnotationValue, etc.
- Basic properties include:
-
"Summary" data information table "Dimension" dimensionality of point coordinates "ObservationRegion" observation region "RegionMeasure" measure of the observation region "ConfigurationCount" number of point configurations "Points" point coordinates of the first configuration "PointsList" point coordinates of all configurations "PointCount" number of points in the first point configuration "PointCountList" number of points in all point configurations "MeanPointCount" mean point count across all point configurations "MeanPointDensity" mean point density across all point configurations "FryPlot" directional scatter plot - SpatialPointData[sdata,newreg] creates a subset of the original spatial point data, with a new observation region being the intersection of newreg and the original observation region.
- SpatialPointData can be used with functions such as HistogramPointDensity, RipleyK and SpatialRandomnessTest.

Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Create a univariate SpatialPointData:

https://wolfram.com/xid/0cpq3hr7zpevdu-05vj9t


https://wolfram.com/xid/0cpq3hr7zpevdu-cwp7fb

Multivariate SpatialPointData:

https://wolfram.com/xid/0cpq3hr7zpevdu-eqd45i


https://wolfram.com/xid/0cpq3hr7zpevdu-utst7n

Create a SpatialPointData for a list of GeoPosition:

https://wolfram.com/xid/0cpq3hr7zpevdu-ffv7tf
Specify region as the state of Texas:

https://wolfram.com/xid/0cpq3hr7zpevdu-fyixws

https://wolfram.com/xid/0cpq3hr7zpevdu-l6yvok


https://wolfram.com/xid/0cpq3hr7zpevdu-kcc7m2

Scope (22)Survey of the scope of standard use cases
Basic Uses (8)
Create univariate spatial point data over an interval:

https://wolfram.com/xid/0cpq3hr7zpevdu-lxbc5r

https://wolfram.com/xid/0cpq3hr7zpevdu-49g3zh

https://wolfram.com/xid/0cpq3hr7zpevdu-luqbrw


https://wolfram.com/xid/0cpq3hr7zpevdu-bqmh64

Create a 2D spatial point from random points in a disk:

https://wolfram.com/xid/0cpq3hr7zpevdu-ql90c4

https://wolfram.com/xid/0cpq3hr7zpevdu-418t0t

https://wolfram.com/xid/0cpq3hr7zpevdu-dnb8vf


https://wolfram.com/xid/0cpq3hr7zpevdu-ygpx01


https://wolfram.com/xid/0cpq3hr7zpevdu-8y039b

https://wolfram.com/xid/0cpq3hr7zpevdu-jy772d

The data points and the region:

https://wolfram.com/xid/0cpq3hr7zpevdu-yjivgq

Identify a hardcore radius by plotting the vectors between all pairs of different data points:

https://wolfram.com/xid/0cpq3hr7zpevdu-wz8wrt

The plot of the vectors is called a Fry plot, and can be extracted directly from the spatial point data:

https://wolfram.com/xid/0cpq3hr7zpevdu-z9yv6c

Construct SpatialPointData with random geodetic points:

https://wolfram.com/xid/0cpq3hr7zpevdu-bo26k


https://wolfram.com/xid/0cpq3hr7zpevdu-beip6q


https://wolfram.com/xid/0cpq3hr7zpevdu-ewaa4

Extract the locations of the largest cities in the United States:

https://wolfram.com/xid/0cpq3hr7zpevdu-dwhuda
Create SpatialPointData with the region specified by the country polygon:

https://wolfram.com/xid/0cpq3hr7zpevdu-3dvdm7

Plot the locations of the cities:

https://wolfram.com/xid/0cpq3hr7zpevdu-gdu1il

Obtain a regular grid over Mexico using GeoElevationData:

https://wolfram.com/xid/0cpq3hr7zpevdu-hpi8y5

The grid points are given in the form of an array:

https://wolfram.com/xid/0cpq3hr7zpevdu-0lh690

Flatten to obtain a list of points with elevations:

https://wolfram.com/xid/0cpq3hr7zpevdu-ew0hum


https://wolfram.com/xid/0cpq3hr7zpevdu-yzsv49


https://wolfram.com/xid/0cpq3hr7zpevdu-2k705b

Obtain data from a ResourceObject:

https://wolfram.com/xid/0cpq3hr7zpevdu-zpk257


https://wolfram.com/xid/0cpq3hr7zpevdu-d25g02


https://wolfram.com/xid/0cpq3hr7zpevdu-is6817

Region (3)
SpatialPointData is defined with respect to an observation region in which the points occur:

https://wolfram.com/xid/0cpq3hr7zpevdu-xbud2i

https://wolfram.com/xid/0cpq3hr7zpevdu-w8r9d


https://wolfram.com/xid/0cpq3hr7zpevdu-kb8783


https://wolfram.com/xid/0cpq3hr7zpevdu-dp2t2l

Only the points within the specified observation region are retained:

https://wolfram.com/xid/0cpq3hr7zpevdu-bqanl


https://wolfram.com/xid/0cpq3hr7zpevdu-stj0dx

If the observation region is not specified, it is estimated with the Ripley–Rasson estimator (a dilation of the convex hull):

https://wolfram.com/xid/0cpq3hr7zpevdu-lysvf

Visualize the estimated region together with the points:

https://wolfram.com/xid/0cpq3hr7zpevdu-dbw3sl

Create new spatial point data by intersecting it with another region:

https://wolfram.com/xid/0cpq3hr7zpevdu-w6a25d

https://wolfram.com/xid/0cpq3hr7zpevdu-t1xl1y

https://wolfram.com/xid/0cpq3hr7zpevdu-ukjyz

https://wolfram.com/xid/0cpq3hr7zpevdu-e7ib4x


https://wolfram.com/xid/0cpq3hr7zpevdu-yalr59

Create new spatial point data with a larger new region by reconstruction:

https://wolfram.com/xid/0cpq3hr7zpevdu-oj9xdp

https://wolfram.com/xid/0cpq3hr7zpevdu-ienrdr

The new observation region is exactly the new region given:

https://wolfram.com/xid/0cpq3hr7zpevdu-rtpx52


https://wolfram.com/xid/0cpq3hr7zpevdu-v4fkuv


https://wolfram.com/xid/0cpq3hr7zpevdu-tos28

Transformations (3)
Translate SpatialPointData:

https://wolfram.com/xid/0cpq3hr7zpevdu-o3mmr6

Define and apply a translation transform:

https://wolfram.com/xid/0cpq3hr7zpevdu-r196ug
Plot the original data and region with the transformed results:

https://wolfram.com/xid/0cpq3hr7zpevdu-x80tt8

Rotate SpatialPointData:

https://wolfram.com/xid/0cpq3hr7zpevdu-5iem13

Define and apply a rotating transform:

https://wolfram.com/xid/0cpq3hr7zpevdu-tbuknj

Plot the original data and region with the transformed results:

https://wolfram.com/xid/0cpq3hr7zpevdu-iqmd6n

Rescale SpatialPointData:

https://wolfram.com/xid/0cpq3hr7zpevdu-jjelmn

Define and apply a scaling transform:

https://wolfram.com/xid/0cpq3hr7zpevdu-jsmwoc

Plot the original data and region with the transformed results:

https://wolfram.com/xid/0cpq3hr7zpevdu-f6xxk1

Annotations (6)
Extract the names and locations of the largest cities in Ireland:

https://wolfram.com/xid/0cpq3hr7zpevdu-hdyqv7
Specify the region to be the country polygon:

https://wolfram.com/xid/0cpq3hr7zpevdu-dbsz6n


https://wolfram.com/xid/0cpq3hr7zpevdu-x4t6d3

Annotations can be also accessed using specific annotation functions:

https://wolfram.com/xid/0cpq3hr7zpevdu-bt5106

Extract the values for a given key:

https://wolfram.com/xid/0cpq3hr7zpevdu-3j74r3

Plot the data with the names in tooltips:

https://wolfram.com/xid/0cpq3hr7zpevdu-6l9ltu

Add both categorical and numeric annotations to a point pattern:

https://wolfram.com/xid/0cpq3hr7zpevdu-f6s2u5

https://wolfram.com/xid/0cpq3hr7zpevdu-ojwxgj


https://wolfram.com/xid/0cpq3hr7zpevdu-bl0mcg

Annotations are automatically labeled:

https://wolfram.com/xid/0cpq3hr7zpevdu-cssnmf

Plot data with the annotations:

https://wolfram.com/xid/0cpq3hr7zpevdu-dn2t2g

Provide explicit keys for the annotations:

https://wolfram.com/xid/0cpq3hr7zpevdu-hcp3t0

https://wolfram.com/xid/0cpq3hr7zpevdu-d3qt2

Extract the keys of annotations:

https://wolfram.com/xid/0cpq3hr7zpevdu-g3vm2t


https://wolfram.com/xid/0cpq3hr7zpevdu-dw0mhu

Extract a particular annotation:

https://wolfram.com/xid/0cpq3hr7zpevdu-et7wh9


https://wolfram.com/xid/0cpq3hr7zpevdu-fvwaq8

Define spatial point data with multiple annotations of each type:

https://wolfram.com/xid/0cpq3hr7zpevdu-z8kkcw

https://wolfram.com/xid/0cpq3hr7zpevdu-0txwpa

Annotation keys are shown in the summary:

https://wolfram.com/xid/0cpq3hr7zpevdu-g7y091

Assign annotations to a subset of the pattern using SparseArray:

https://wolfram.com/xid/0cpq3hr7zpevdu-w4fq


https://wolfram.com/xid/0cpq3hr7zpevdu-hvercf


https://wolfram.com/xid/0cpq3hr7zpevdu-ertkhf

Add annotations to spatial data defined with GeoPosition:

https://wolfram.com/xid/0cpq3hr7zpevdu-nn3su2

https://wolfram.com/xid/0cpq3hr7zpevdu-mp2ut0


https://wolfram.com/xid/0cpq3hr7zpevdu-c7eqw2

Visualize the points with annotations:

https://wolfram.com/xid/0cpq3hr7zpevdu-evwewb

Configurations (2)
Create spatial point data with two point configurations and different annotations:

https://wolfram.com/xid/0cpq3hr7zpevdu-w9m3pj

https://wolfram.com/xid/0cpq3hr7zpevdu-328wkg

https://wolfram.com/xid/0cpq3hr7zpevdu-gi5rnx

Select first point configuration only:

https://wolfram.com/xid/0cpq3hr7zpevdu-tlbdl9


https://wolfram.com/xid/0cpq3hr7zpevdu-nfs3f8

Create new spatial point data by reversing the order of point configurations:

https://wolfram.com/xid/0cpq3hr7zpevdu-1mi7f2


https://wolfram.com/xid/0cpq3hr7zpevdu-bjxxk5

Create copies of point configurations:

https://wolfram.com/xid/0cpq3hr7zpevdu-gko74t


https://wolfram.com/xid/0cpq3hr7zpevdu-00hbd7

Extract all the point configurations as individual SpatialPointData objects:

https://wolfram.com/xid/0cpq3hr7zpevdu-32iahf


https://wolfram.com/xid/0cpq3hr7zpevdu-qyzotg

Applications (8)Sample problems that can be solved with this function
Locations of breweries in the US:

https://wolfram.com/xid/0cpq3hr7zpevdu-mpoy51
The data contains locations from Alaska and Hawaii:

https://wolfram.com/xid/0cpq3hr7zpevdu-0h68j2

Create SpatialPointData with breweries in contiguous US only:

https://wolfram.com/xid/0cpq3hr7zpevdu-q208qt


https://wolfram.com/xid/0cpq3hr7zpevdu-ddnfxt


https://wolfram.com/xid/0cpq3hr7zpevdu-jpvd5x

https://wolfram.com/xid/0cpq3hr7zpevdu-kz2tw1


https://wolfram.com/xid/0cpq3hr7zpevdu-zwotih


https://wolfram.com/xid/0cpq3hr7zpevdu-znpb6n

Operating nuclear reactors in the world:

https://wolfram.com/xid/0cpq3hr7zpevdu-yhoar6


https://wolfram.com/xid/0cpq3hr7zpevdu-3hxxmu

The locations of 58 US national parks:

https://wolfram.com/xid/0cpq3hr7zpevdu-nk993y

https://wolfram.com/xid/0cpq3hr7zpevdu-zk3job

Extract positions from Wikipedia:

https://wolfram.com/xid/0cpq3hr7zpevdu-1by367
Latitude and longitude bounds:

https://wolfram.com/xid/0cpq3hr7zpevdu-322r9


https://wolfram.com/xid/0cpq3hr7zpevdu-3xsk88


https://wolfram.com/xid/0cpq3hr7zpevdu-w6igm

Define SpatialPointData:

https://wolfram.com/xid/0cpq3hr7zpevdu-5zfa65

Plot the national parks on a map:

https://wolfram.com/xid/0cpq3hr7zpevdu-mad09c

US national park data of positions and areas:

https://wolfram.com/xid/0cpq3hr7zpevdu-hvdzi0

Explore the available annotations:

https://wolfram.com/xid/0cpq3hr7zpevdu-36f0ta

Visualize the area of each park:

https://wolfram.com/xid/0cpq3hr7zpevdu-ymaypy

Illinois rest areas with location and status information:

https://wolfram.com/xid/0cpq3hr7zpevdu-kfxe6z


https://wolfram.com/xid/0cpq3hr7zpevdu-yhvlav


https://wolfram.com/xid/0cpq3hr7zpevdu-e1b596

Locations and information of rest area facilities in Illinois:

https://wolfram.com/xid/0cpq3hr7zpevdu-862qxy

https://wolfram.com/xid/0cpq3hr7zpevdu-o240xq

https://wolfram.com/xid/0cpq3hr7zpevdu-k9yyc4

Available information for each rest area location:

https://wolfram.com/xid/0cpq3hr7zpevdu-n3y95w

Visualize the accessible locations with mouseover names:

https://wolfram.com/xid/0cpq3hr7zpevdu-cgqmeg

Analyze the spatial distribution of earthquakes:

https://wolfram.com/xid/0cpq3hr7zpevdu-727om2

https://wolfram.com/xid/0cpq3hr7zpevdu-ms2ked


Create the spatial point data from the values:

https://wolfram.com/xid/0cpq3hr7zpevdu-woyy1

Visualize the locations of the earthquakes:

https://wolfram.com/xid/0cpq3hr7zpevdu-s1wqke

Properties & Relations (2)Properties of the function, and connections to other functions
Query properties of well-defined SpatialPointData:

https://wolfram.com/xid/0cpq3hr7zpevdu-jt8qq0

https://wolfram.com/xid/0cpq3hr7zpevdu-cxp2p1


https://wolfram.com/xid/0cpq3hr7zpevdu-pyn4wf


https://wolfram.com/xid/0cpq3hr7zpevdu-crup59


https://wolfram.com/xid/0cpq3hr7zpevdu-e6x2lo

Find the number of points in a subregion:

https://wolfram.com/xid/0cpq3hr7zpevdu-50ho3g

https://wolfram.com/xid/0cpq3hr7zpevdu-mnta71


https://wolfram.com/xid/0cpq3hr7zpevdu-by4k91

Number of points in some subregions:

https://wolfram.com/xid/0cpq3hr7zpevdu-zklqtn


https://wolfram.com/xid/0cpq3hr7zpevdu-6c9fdw


https://wolfram.com/xid/0cpq3hr7zpevdu-lr0bvv

Wolfram Research (2020), SpatialPointData, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialPointData.html.
Text
Wolfram Research (2020), SpatialPointData, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialPointData.html.
Wolfram Research (2020), SpatialPointData, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialPointData.html.
CMS
Wolfram Language. 2020. "SpatialPointData." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SpatialPointData.html.
Wolfram Language. 2020. "SpatialPointData." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SpatialPointData.html.
APA
Wolfram Language. (2020). SpatialPointData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SpatialPointData.html
Wolfram Language. (2020). SpatialPointData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SpatialPointData.html
BibTeX
@misc{reference.wolfram_2025_spatialpointdata, author="Wolfram Research", title="{SpatialPointData}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/SpatialPointData.html}", note=[Accessed: 15-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_spatialpointdata, organization={Wolfram Research}, title={SpatialPointData}, year={2020}, url={https://reference.wolfram.com/language/ref/SpatialPointData.html}, note=[Accessed: 15-April-2025
]}