Planetary-scale answers, unlocked.
A Hands-On Guide for Working with Large-Scale Spatial Data. Learn more.
Authors
Geospatial data is information tied to a location on the Earth's surface. A store, a road, a storm forecast, and a satellite photo of a city are all geospatial data. Each records where something is and what it is. The US Census Bureau describes geospatial data as data that is "clearly geographic in nature," such as maps and data for geographic information system (GIS) software. This article claims that most questions about a place need both main types in one query. The two types are vector objects, such as buildings, and raster grids, such as a land cover map. A walkthrough over Lake Havasu City, Arizona, tests the claim on five layers.
"Geospatial" combines "geo", the Earth, with "spatial", relating to space and position. Every geospatial record has three parts.
Spatial data is any data with a position in some space, including a warehouse floor plan or a medical scan. Geospatial data is spatial data referenced to the Earth. GIS data is geospatial data packaged as map layers for a geographic information system.
Coordinates need a reference system. The pair (-114.35, 34.47) is a spot in Lake Havasu City, Arizona. It points there only because a CRS says the numbers are longitude and latitude on the ellipsoid of WGS 84, the World Geodetic System 1984. The International Association of Oil & Gas Producers (IOGP) maintains a dataset called EPSG Dataset. It assigns codes such as EPSG:4326 to these systems.
Objects or fields. Helen Couclelis framed the two ways people model geography in People manipulate objects (but cultivate fields) (1992). In the object view, the world is made of things with boundaries, such as a building: vector data. In the field view, a value exists everywhere, such as elevation: raster data.
Geometry has a standard shape. The Open Geospatial Consortium (OGC) Simple Feature Access standard defines the core geometry types: Point, LineString, Polygon, and their multi and collection forms. The International Organization for Standardization (ISO) also publishes it as ISO 19125. It ties each geometry to a spatial reference system. PostGIS and Apache Sedona follow it, so ST_Intersects means the same thing in both.
Relations are computed from geometry. Max Egenhofer and Robert Franzosa's point-set topological spatial relations (1991) compare the interiors and boundaries of two shapes to define relations such as contains, touches, and overlaps. Spatial SQL uses those relations as true-or-false tests. A spatial join applies them across whole tables.
Vector data represents discrete features with geometry and a row of attributes.
Raster data divides an area into a regular grid of cells. Each cell holds one value per band, a band being one measured layer. A satellite image stores reflectance per pixel. A digital elevation model stores height, and a land cover map stores a class code. A weather model such as the High-Resolution Rapid Refresh (HRRR) stores temperature or wind speed. Cell size sets the resolution: a 10-meter pixel in Sentinel-2 imagery covers 100 square meters on the ground.
A point cloud is a set of 3D points, each with x, y, and z coordinates and attributes such as return intensity and a class code (ground, building, vegetation). Most come from lidar (light detection and ranging) scanners on aircraft, drones, and vehicles. The LAS format, the standard exchange file for point clouds, comes from the American Society for Photogrammetry and Remote Sensing (ASPRS). The U.S. Geological Survey (USGS) 3D Elevation Program references LAS 1.4 revision 15.
A trajectory is an ordered sequence of positions and timestamps for one moving object. Examples are a delivery van, a phone, a vessel broadcasting its position over the Automatic Identification System (AIS), or an aircraft. Yu Zheng's survey Trajectory Data Mining: An Overview (ACM Transactions on Intelligent Systems and Technology, 2015) covers cleaning, indexing, and mining them.
Tables of addresses become geospatial once geocoded. Discrete global grids such as H3 assign every place on Earth to a cell ID, so tables join on the cell. Kevin Sahr, Denis White, and A. Jon Kimerling describe these grids in Geodesic Discrete Global Grid Systems (2003).
For a full comparison, see raster vs vector data.
Insurers join buildings and parcels to hazard layers for probable maximum loss estimates and stochastic models. Energy companies screen land for solar farms and data center sites. Geospatial AI models and agents read the same layers to answer questions about real places, the basis of physical AI. Geospatial analysis is the set of methods that turn these layers into answers.
Wherobots is a cloud platform for geospatial data, built by the creators of Apache Sedona. In WherobotsDB, vector and raster data share one SQL and Python engine, with tables in GeoParquet and Apache Iceberg. The Havasu catalog lists the open datasets ready to query, including Overture places, Sentinel-2 imagery, and National Agriculture Imagery Program (NAIP) aerial imagery. The Wherobots Model Context Protocol (MCP) server lets AI coding tools explore the catalog and run spatial SQL.
The walkthrough uses one box around Lake Havasu City, Arizona, and five layers. Overture buildings, roads, and places are the vector data. ESA WorldCover land cover and the Copernicus DEM, a digital elevation model, are the raster data.
buildings_building
transportation_segment
places_place
Row counts are COUNT(*) results on the Wherobots open data tables in October 2026. WherobotsDB ran all three queries in one SQL engine, on vector tables and raster files together. Most stacks pick one data model.
COUNT(*)
ST_PolygonFromEnvelope builds a rectangle from two corners. ST_Intersects keeps the features that touch it. This query counts the three vector layers and measures them on the WGS 84 ellipsoid:
ST_PolygonFromEnvelope
ST_Intersects
WITH aoi AS (SELECT ST_PolygonFromEnvelope(-114.375, 34.455, -114.32, 34.49) AS g) SELECT 'buildings' AS layer, COUNT(*) AS features, ROUND(SUM(ST_AreaSpheroid(ST_Intersection(b.geometry, aoi.g))) / 1e6, 3) AS area_km2, CAST(NULL AS DOUBLE) AS length_km FROM wherobots_open_data.overture_maps_foundation.buildings_building b, aoi WHERE ST_Intersects(b.geometry, aoi.g) UNION ALL SELECT 'road segments', COUNT(*), NULL, ROUND(SUM(ST_LengthSpheroid(ST_Intersection(s.geometry, aoi.g))) / 1000, 1) FROM wherobots_open_data.overture_maps_foundation.transportation_segment s, aoi WHERE s.subtype = 'road' AND ST_Intersects(s.geometry, aoi.g) UNION ALL SELECT 'places', COUNT(*), NULL, NULL FROM wherobots_open_data.overture_maps_foundation.places_place p, aoi WHERE ST_Intersects(p.geometry, aoi.g)
The query ran in 33.8 seconds. Grouping places by category profiles the town:
SELECT basic_category, COUNT(*) AS places FROM wherobots_open_data.overture_maps_foundation.places_place WHERE ST_Intersects(geometry, ST_PolygonFromEnvelope(-114.375, 34.455, -114.32, 34.49)) AND basic_category IS NOT NULL GROUP BY basic_category ORDER BY places DESC LIMIT 5
ESA WorldCover stores one class code per 10 m pixel in 3 by 3 degree COGs. RS_TileExplode splits the file into 512-pixel tiles, and the engine reads a tile only when a query uses it. RS_Clip cuts the tiles that touch the box. RS_BandAsArray turns the pixels into rows to count:
RS_TileExplode
RS_Clip
RS_BandAsArray
WITH aoi AS ( SELECT ST_PolygonFromEnvelope(-114.375, 34.455, -114.32, 34.49) AS g ), wc AS ( -- 512-pixel tiles of the 3 x 3 degree file, read on demand SELECT RS_TileExplode(RS_FromPath('s3://esa-worldcover/v200/2021/map/ESA_WorldCover_10m_2021_v200_N33W117_Map.tif'), 512, 512) AS (x, y, rast) ), c AS ( -- RS_Clip(raster, band, geometry, allTouched, noDataValue, crop) SELECT /*+ BROADCAST(aoi) */ RS_Clip(wc.rast, 1, aoi.g, false, 0, true) AS c FROM wc CROSS JOIN aoi WHERE RS_Intersects(wc.rast, aoi.g) ) SELECT CAST(v AS INT) AS worldcover_class, COUNT(*) AS pixels, ROUND(100 * COUNT(*) / SUM(COUNT(*)) OVER (), 1) AS pct FROM (SELECT explode(RS_BandAsArray(c, 1)) AS v FROM c) WHERE v > 0 GROUP BY CAST(v AS INT) ORDER BY pixels DESC
The box holds 277,200 pixels, counted in 5.0 seconds. Built-up (class 50) covers 40.2%, permanent water (80) 30.2%, bare or sparse vegetation (60) 23.8%, tree cover (10) 2.0%, shrubland (20) 1.9%, grassland (30) 1.9%, and cropland (40) 0.1%.
In the last query, each building becomes its centroid, the point at the center of its footprint. Each place stays a point. RS_Value returns the WorldCover class and the DEM elevation under every feature. BROADCAST copies the few raster tiles to every worker. The query plan has two BroadcastIndexJoin steps, each with an R-tree index on the tiles, and no Cartesian product, the step that pairs every row with every other row. Each feature keeps its Overture id through the grouping:
RS_Value
BROADCAST
BroadcastIndexJoin
id
WITH aoi AS ( SELECT ST_PolygonFromEnvelope(-114.375, 34.455, -114.32, 34.49) AS g ), wc AS ( -- ESA WorldCover 2021, 10 m land cover: 512-pixel tiles of one 3 x 3 degree COG SELECT RS_TileExplode(RS_FromPath('s3://esa-worldcover/v200/2021/map/ESA_WorldCover_10m_2021_v200_N33W117_Map.tif'), 512, 512) AS (x, y, rast) ), dem AS ( -- Copernicus DEM GLO-30, 30 m surface elevation: 512-pixel tiles of one 1 x 1 degree COG SELECT RS_TileExplode(RS_FromPath('s3://copernicus-dem-30m/Copernicus_DSM_COG_10_N34_00_W115_00_DEM/Copernicus_DSM_COG_10_N34_00_W115_00_DEM.tif'), 512, 512) AS (x, y, rast) ), wc_aoi AS (SELECT /*+ BROADCAST(aoi) */ wc.rast FROM wc CROSS JOIN aoi WHERE RS_Intersects(wc.rast, aoi.g)), dem_aoi AS (SELECT /*+ BROADCAST(aoi) */ dem.rast FROM dem CROSS JOIN aoi WHERE RS_Intersects(dem.rast, aoi.g)), f AS ( -- vector features: building centroids and place points SELECT /*+ BROADCAST(aoi) */ 'building' AS kind, b.id, ST_Centroid(b.geometry) AS pt FROM wherobots_open_data.overture_maps_foundation.buildings_building b CROSS JOIN aoi WHERE ST_Intersects(b.geometry, aoi.g) UNION ALL SELECT /*+ BROADCAST(aoi) */ 'place', p.id, p.geometry FROM wherobots_open_data.overture_maps_foundation.places_place p CROSS JOIN aoi WHERE ST_Intersects(p.geometry, aoi.g) ), v AS ( -- one land cover class and one elevation per feature, keyed by its Overture id SELECT /*+ BROADCAST(w), BROADCAST(d) */ f.kind, f.id, CAST(RS_Value(w.rast, f.pt) AS INT) AS worldcover_class, RS_Value(d.rast, f.pt) AS elev_m FROM f JOIN wc_aoi w ON RS_Intersects(w.rast, f.pt) JOIN dem_aoi d ON RS_Intersects(d.rast, f.pt) ) SELECT kind, worldcover_class, COUNT(DISTINCT id) AS features, ROUND(percentile_approx(elev_m, 0.5), 1) AS median_elev_m, ROUND(MIN(elev_m), 1) AS min_elev_m, ROUND(MAX(elev_m), 1) AS max_elev_m FROM v GROUP BY kind, worldcover_class ORDER BY kind, features DESC
The Copernicus DEM is a surface model, so its heights include roofs and trees. Every feature matched a pixel in both rasters. The building rows sum to 4,844 and the place rows to 2,078, the totals from the first query. Built-up land covers 40.2% of the box and holds 4,477 of the 4,844 buildings, 92.4%. The 7 buildings on water pixels sit at 136.0 to 138.3 m, the lowest values in the table. They are on the shoreline, where a 10 m pixel of lake can cover a dock or boathouse. Buildings reach 244.7 m in the hills to the northeast, about 109 m above the shoreline.
The 330 buildings on bare or sparse pixels are places where the two sources disagree. Possible causes are construction after 2021, or structures smaller than a 10 m pixel. The same pattern scales to a county or country by swapping the box for tract or parcel polygons from the census tracts table, or by summarising features into H3 cells.
The walkthrough's box filter, spatial index, and raster-vector join come from six decades of research.
Digital geospatial data starts with the Canada Land Inventory, set up in 1962 to map what rural land could support. Roger Tomlinson led the system that automated its map analysis, the Canada Geographic Information System, the first operational GIS. His 1968 paper is the first known published use of the term. The Royal Geographical Society's obituary of Roger Tomlinson (2014) calls him the father of GIS.
Landsat 1 added a gridded stream, the raster archive behind Earth observation data. Michael Goodchild argued in Geographical information science (1992) that representation, accuracy, and spatial analysis formed a research field of their own.
Rows have no natural order in two dimensions, so finding the features in a box needs a spatial index. Raphael Finkel and Jon Bentley's quad trees (Acta Informatica, 1974) split space into four quadrants recursively. Antonin Guttman's R-trees: a dynamic index structure for spatial searching (SIGMOD 1984) groups nearby objects under bounding rectangles in a balanced tree. A search visits only the rectangles that overlap its box. Norbert Beckmann, Hans-Peter Kriegel, Ralf Schneider, and Bernhard Seeger's R*-tree (SIGMOD 1990) improved how the tree splits its nodes. R-tree variants remain a common spatial index.
Thomas Brinkhoff, Kriegel, and Seeger processed spatial joins with R-trees (SIGMOD 1993) by walking two trees together. Jignesh Patel and David DeWitt's partition based spatial-merge join (SIGMOD 1996) split both inputs into spatial partitions. It then joined each pair of partitions. Distributed engines still follow this pattern. Ralf Hartmut Güting's survey An introduction to spatial database systems (1994) listed what a spatial database must offer: spatial types, spatial indexing, and spatial joins. The Open Geospatial Consortium, founded in 1994, turned those types into the Simple Features standard. PostGIS, Apache Sedona, and cloud warehouses implement it.
In the 2010s, global datasets grew too large for one database server. Ahmed Eldawy and Mohamed Mokbel built SpatialHadoop (ICDE 2015) on MapReduce. Jia Yu, Jinxuan Wu, and Mohamed Sarwat introduced GeoSpark (ACM SIGSPATIAL 2015) on Apache Spark. Yu, Zongsi Zhang, and Sarwat described its design in Spatial data management in Apache Spark: the GeoSpark perspective and beyond (2019). GeoSpark splits data into spatial partitions, indexes each partition, and runs range, nearest-neighbour, and join queries across a cluster. GeoSpark entered the Apache incubator as Sedona in 2020 and became a top-level Apache project in February 2023. Yu and Sarwat went on to found Wherobots.
The Lake Havasu City walkthrough shows that geospatial data comes as vector features and raster grids on shared coordinates, and that one question about a place can draw on both.
ST_AreaSpheroid
ST_LengthSpheroid
Query vector and raster geospatial data together with a Wherobots free trial at cloud.wherobots.com.
Geospatial data is information tied to a location on the Earth’s surface. Each record has a location, stored as coordinates, an address, or a shape such as a point, line, polygon, or grid cell. It also has attributes that describe what is there, and often a timestamp for when it was observed.
The two main types are vector data and raster data. Vector data represents discrete features as points, lines, and polygons, such as stores, roads, and building outlines. Raster data divides an area into a grid of cells, or pixels, each holding a value, such as satellite imagery, elevation, or temperature.
Examples include satellite and aerial imagery, building footprints, road networks, and points of interest such as restaurants and hospitals. Others are property parcels, census boundaries, GPS tracks from vehicles and ships, elevation models, weather forecasts, and flood zone maps.
Spatial data is any data with a position in some space, which can include the layout of a factory floor or a medical scan. Geospatial data is spatial data whose positions refer to the Earth, through latitude and longitude or another coordinate reference system. In GIS and mapping, people often use the two terms interchangeably.
GIS data is geospatial data prepared for use in a geographic information system, usually as layers such as Shapefiles, geodatabases, or GeoTIFFs. Geospatial data is the broader term and also covers data used outside GIS software, for example in SQL engines, data lakes, and machine learning pipelines.
Common vector formats are Shapefile, GeoJSON, GeoPackage, KML (Keyhole Markup Language), and GeoParquet. Common raster formats are GeoTIFF, Cloud Optimized GeoTIFF (COG), NetCDF, and Zarr. Table formats such as Apache Iceberg now include native geometry types, so vector data can live in a data lake alongside other tables.
Free sources include the US Census Bureau’s TIGER/Line boundaries, USGS elevation and Landsat imagery, and the European Space Agency’s Sentinel-2 imagery. Others are National Oceanic and Atmospheric Administration (NOAA) weather data and Overture Maps Foundation’s buildings, places, roads, and boundaries. Wherobots hosts many of these as ready-to-query tables in its open data catalog.
Geospatial combines geo, meaning the Earth, with spatial, meaning relating to space and position. It describes anything located on or near the Earth’s surface, and the data, software, and analysis that work with those locations.
Turn-by-turn navigation on a phone is a common example. It is built from GPS positions, a road network, and live speed data, all tied to locations. Other examples are weather radar, satellite images of a wildfire, a delivery company’s route plan, and an insurer’s map of homes inside a flood zone.
A point cloud is a set of 3D points, usually from a lidar scanner. Each point has x, y, and z coordinates plus attributes such as intensity and a class code like ground or building. A trajectory is an ordered series of positions and timestamps for one moving object, such as a vehicle, a vessel, or a phone.
Roger Tomlinson led the Canada Geographic Information System, built in the 1960s for the Canada Land Inventory and widely recognised as the first operational GIS. His 1968 paper, A Geographic Information System for Regional Planning, is the first known published use of the term geographic information system.
A spatial index organises geometries so a query can find the ones in an area without checking every row. The R-tree, introduced by Antonin Guttman in 1984, groups nearby objects under bounding rectangles in a balanced tree. Quadtrees and grid systems such as H3 are other common choices, and distributed engines such as Apache Sedona partition data spatially and build an index on each partition.
What is a Geofence? How Geofencing Works, With Examples
A geofence is a virtual boundary that triggers an action when a device enters or leaves it. How geofencing works, its uses and limits, and a test on ship data.
What is Map Matching? GPS Traces, Methods and Examples
Map matching places each GPS record on the road a vehicle drove. How it works, nearest-road snapping vs hidden Markov models, and a test on Ann Arbor drives.
Geospatial Big Data: Why Analytics Is Hard to Scale
Teams struggle to scale geospatial analytics for five reasons: data volume, mixed formats, many coordinate systems, spatial joins and pipeline upkeep.
share this article
Awesome that you’d like to share our articles. Where would you like to share it to: