Spatial Data Primer

What exactly *is* spatial data?

A spatial data asset is any data asset that contains spatial or location information. This term is intentionally broad, and GeoDIDs are deliberately flexible enough to identify current and legacy spatial data types, as well as ones that haven't been developed yet.

Generally, spatial data assets to fall into two categories: raster and vector.

Raster
Vector
Raster

Raster data are composed of grid cells identified by row and column. The whole geographic area is divided into groups of individual cells, which represent an image. Satellite images, photographs, scanned images, etc., are examples of raster data (Janipella et al 2019).

A (very) simplified representation of a 3x3 pixel raster image in Python:

img = [[ 1, 0, 1 ],
[ 0, 1, 0 ],
[ 1, 0, 1 ]]

To start, GeoDID modules will natively support GeoTIFF raster datasets.

Vector

In a vector dataset, features are individual units in the dataset, and each feature typically represents a point, line or polygon. These features are represented mathematically, usually by numbers that signify either the coordinates of the point, or the vertices (corners) of the geometry - read more here.

point = [ 45.841616, 6.212074 ]
line = [[ -0.131838, 51.52241 ],
[ -3.142085, 51.50190 ],
[ -3.175046, 55.96150 ]]
polygon = [[[ -43.06640, 17.47643 ],
[ -46.40625, 10.83330 ],
[ -37.26562, 11.52308 ],
[ -43.06640, 17.47643 ]]]
# ^^ The first and last coordinate are the same
Example of vector features from Saylor Academy, https://saylordotorg.github.io/text_essentials-of-geographic-information-systems/s11-geospatial-analysis-i-vector-o.html.

The vector data formats most commonly used on the web are SVGs and GeoJSON files. SVGs - scalable vector graphics - do not have a geographic referencing system - but GeoJSON datasets do.

For the alpha implementation of the GeoDID specification, we chose GeoJSON files as our natively-supported vector filetype. For reference, here's a simple GeoJSON Polygon Feature - notice the array of vertices in the geometry attribute, similar to the polygon variable shown above:

{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-0.0986060,
51.5326047
],
[
-78.639101,
35.7803929
],
[
-8.6094188,
41.1398493
],
[
-0.0986060,
51.5326047
]
]
]
}
}

Spatial data assets are data assets - binary files, or directories of files - that contain spatially-referenced information. For v0.0, GeoDIDs natively support GeoTIFF and GeoJSON files, which are commonly-used raster and vector data formats respectively. In the future, spatial data of any format can be identified using a GeoDID, and these format extensions can be built for the @astral-geodid software modules.

More on GeoJSON and geojson.io, a tool for creating and exploring GeoJSON files.

More information about GeoTIFFs, plus a sample.

Learn more background theory on spatial data here.

Edit on GitHub