SpatialPointData

SpatialPointData[points]

represents a collection of spatial locations points.

SpatialPointData[points,reg]

represents a collection of points within the region reg.

SpatialPointData[pointsvals,]

associates the values vals with the location points.

SpatialPointData[points<|key1vals1,|>,]

associates the key-value annotations keyivalsi.

SpatialPointData[{p1data1,p2data2,},]

represents the spatial point collection {p1,p2,} with associated values {data1,data2,}.

SpatialPointData[{points1,points2,},]

represents multiple collections of spatial points.

SpatialPointData[{points1anns1,points2anns2,},]

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 pid
    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 configuartion
    {"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 all

Basic Examples  (2)

Create a univariate SpatialPointData:

Multivariate SpatialPointData:

Create a SpatialPointData for a list of GeoPosition:

Specify region as the state of Texas:

Scope  (22)

Basic Uses  (8)

Create univariate spatial point data over an interval:

Plot the data:

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

Visualize the points:

Create 3D spatial point data:

The data points and the region:

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

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

Construct SpatialPointData with random geodetic points:

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

Create SpatialPointData with the region specified by the country polygon:

Plot the locations of the cities:

Obtain a regular grid over Mexico using GeoElevationData:

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

Flatten to obtain a list of points with elevations:

Create spatial point data:

Obtain data from a ResourceObject:

Region  (3)

SpatialPointData is defined with respect to an observation region in which the points occur:

Only the points within the specified observation region are retained:

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

Visualize the estimated region together with the points:

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

New data:

New observation region:

Visualize the regions:

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

The new observation region is exactly the new region given:

Visualize the regions:

Transformations  (3)

Translate SpatialPointData:

Define and apply a translation transform:

Plot the original data and region with the transformed results:

Rotate SpatialPointData:

Define and apply a rotating transform:

Plot the original data and region with the transformed results:

Rescale SpatialPointData:

Define and apply a scaling transform:

Plot the original data and region with the transformed results:

Annotations  (6)

Extract the names and locations of the largest cities in Ireland:

Specify the region to be the country polygon:

List the annotations:

Annotations can be also accessed using specific annotation functions:

Extract the values for a given key:

Plot the data with the names in tooltips:

Add both categorical and numeric annotations to a point pattern:

Extract annotations:

Annotations are automatically labeled:

Plot data with the annotations:

Provide explicit keys for the annotations:

Extract the keys of annotations:

Show the annotations:

Extract a particular annotation:

Define spatial point data with multiple annotations of each type:

Annotation keys are shown in the summary:

Assign annotations to a subset of the pattern using SparseArray:

Show annotations:

Visualize the values:

Add annotations to spatial data defined with GeoPosition:

Show annotations:

Visualize the points with annotations:

Configurations  (2)

Create spatial point data with two point configurations and different annotations:

Select first point configuration only:

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

Create copies of point configurations:

Extract all the point configurations as individual SpatialPointData objects:

Applications  (7)

Store keypoints of an image:

Operating nuclear reactors in the world:

The locations of 58 US national parks:

Extract positions from Wikipedia:

Latitude and longitude bounds:

Define SpatialPointData:

Plot the national parks on a map:

US national park data of positions and areas:

Explore the available annotations:

Visualize the area of each park:

Illinois rest areas with location and status information:

Visualize:

Locations and information of rest area facilities in Illinois:

Available information for each rest area location:

Visualize the accessible locations with mouse-over names:

Analyze the spatial distribution of earthquakes:

Create the spatial point data from the values:

Visualize the locations of the earthquakes:

Properties & Relations  (2)

Query properties of well-defined SpatialPointData:

List of available properties:

Find the number of points in a subregion:

Number of points in some subregions:

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.

CMS

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

BibTeX

@misc{reference.wolfram_2023_spatialpointdata, author="Wolfram Research", title="{SpatialPointData}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/SpatialPointData.html}", note=[Accessed: 18-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_spatialpointdata, organization={Wolfram Research}, title={SpatialPointData}, year={2020}, url={https://reference.wolfram.com/language/ref/SpatialPointData.html}, note=[Accessed: 18-April-2024 ]}