{"canonical_url":"https://engineer.company/glossary/geospatial/","content_markdown":"# Geospatial\n\n## What it is\n\nGeospatial describes data, analysis and software in which a position on the\nEarth is part of the meaning. A temperature reading is only a number until it is\ntied to the place it was taken. A smart-meter reading becomes useful for\nplanning once it can be placed on a feeder, inside a district or near a weather\nstation. The word is an adjective, and it travels with whatever it qualifies:\ngeospatial data, a geospatial join, geospatial modelling.\n\nSpatial on its own is the wider word. A chip layout, a warehouse floor plan\nmeasured in local metres and a mechanical drawing are all spatial, and their\ncoordinates mean nothing outside the drawing. Geospatial data is pinned to the\nplanet through a coordinate reference system, so two datasets that were never\ndesigned together can still be laid over one another and compared.\n\nLocation reaches a dataset in several forms, and they are not equally useful.\n\n- **Coordinates**, usually latitude and longitude from a GPS receiver or a\n  geocoder, give a point that software can compute with directly.\n- **Geometries** describe lines and areas as well as points: a cable route, a\n  flood extent, a service territory. The Simple Features model from the Open\n  Geospatial Consortium (OGC), also published as ISO 19125, defines the shapes\n  that most databases and file formats share.\n- **Addresses and place names** carry location for people, but they have to be\n  geocoded, turned into coordinates, before anything can be measured, and each\n  geocoder resolves them to its own precision.\n- **Area codes**, such as postcodes, municipality numbers or grid-cell\n  identifiers, say which area something lies in without saying where inside it.\n\nUnderneath sits a set of open standards that let geospatial data move between\nsystems without losing its meaning. The OGC publishes the specifications for\ngeometry, for files such as GeoPackage and for web services such as OGC API –\nFeatures. The EPSG registry gives each coordinate reference system a numeric\ncode, so that 4326 means latitude and longitude on WGS 84 wherever it appears.\nPROJ, an open-source library, transforms coordinates from one of those systems\nto another and supports more than a hundred map projections.\n\n## Why it matters\n\nLocation is a join key that almost every dataset already has. Meter readings,\nweather observations, customer records and network assets rarely share an\nidentifier, yet each of them happened somewhere. A geospatial join pairs rows by\nhow their positions relate, one inside another, within a given distance or\ncrossing, instead of by equal values. It connects data that no foreign key ever\nlinked, and that is often the first reason an organisation starts treating its\ndata as geospatial: the question it wants answered spans datasets that only meet\non the map.\n\nThe second reason is that location changes what an average means. A national\nfigure for consumption or for supply interruptions can hide one district that\nis at its limit while the rest have room to spare, and the decision that\nmatters, where to reinforce, where to invest, where to send a crew, is about\nthat district. Grouping by area or by distance shows the spread that a single\ntotal hides.\n\nLocation also carries weight beyond analysis. A short trail of GPS points from\none phone usually shows where its owner sleeps and works, so location data about\npeople deserves the care given to any other personal data. In practice that\nmeans collecting it at the precision the purpose needs, coarsening it before it\nis shared, and keeping it no longer than the purpose lasts.\n\n## What it looks like in practice\n\nSmart meters spread across several regions produced the data behind\n[more than 500 analysis reports written in pure SQL](/portfolio/released-500-electricity-and-gis-data-reports/)\non PostgreSQL and BigQuery. The readings came with geolocation coordinates for\neach meter, which let the scripts use geospatial joins alongside CTEs and window\nfunctions to find regional trends and anomalies. Every report carried its\nannotated SQL so that colleagues could reproduce it, and the common data quality\nproblems, missing GPS coordinates among them, were written down with a\nrecommended way to handle each. Tied to their regions by those joins, the\nfindings went on to aid regional load balancing, and the reports had a hand in\nthe 10–15% rise in operational planning efficiency that followed.\n\nEleven electricity grid operators had the operational data but little geospatial\nanalysis to base their reinforcement and investment decisions on.\n[Their operational data was combined with geospatial modelling](/portfolio/optimized-forecasting-and-investment-strategies/),\nso that each network could be examined on the map and asked which stretches were\nheading towards their limits and which areas justified investment first. The\nanalysis was fitted to how each operator actually ran its network rather than\nhanded out as one template.\n\nGeospatial data also has to stay fast as it grows. In a PostgreSQL application\nwhere location queries had slowed down together with the electricity time\nseries,\n[GiST indexes were added for the geospatial data](/portfolio/accelerated-postgresql-performance-by-10x/),\nand the geographical data was hash-partitioned to spread the load evenly across\nnodes. Geospatial lookups then ran in milliseconds.\n\n## Where it goes wrong\n\n**Unknown positions pile up at zero latitude and zero longitude.** A map of\ncustomers or devices shows a dense cluster in the Gulf of Guinea, where the\nequator crosses the prime meridian, and regional totals include records from a\nplace no customer can be. A device without a GPS fix, or an import that met an\nempty cell, wrote zeros instead of leaving the position empty. Store an unknown\nposition as NULL, add a constraint that rejects the exact pair 0, 0, a spot in\nopen sea, and count the missing positions in every batch so that each report\nstates how many records it left unplaced.\n\n**Joins on coordinates find almost nothing.** Two datasets describe the same\nsubstations, yet joining them on equal latitude and longitude matches only a\nhandful of rows. Each source measured or rounded its coordinates differently,\nand coordinates are floating-point numbers, so two positions a few centimetres\napart are simply different values. Join by distance instead, with a tolerance\nchosen from how accurate the sources are, through a predicate the spatial index\ncan serve. In PostGIS, with geography columns measured in metres:\n\n```sql\nSELECT a.substation_id, b.asset_ref\nFROM survey AS a\nJOIN register AS b\n  ON ST_DWithin(a.location, b.location, 15);\n```\n\nThen review rows that matched more than once, because a tolerance wide enough to\nabsorb measurement error can also bridge two neighbouring assets.\n\n**Points at postcode centres pass for exact positions.** A distance analysis\nreports dozens of customers living at exactly the same spot, or a heat map shows\nsharp peaks in the middle of postal areas. The addresses were geocoded only as\nfar as the postcode, and each came back as the centre of its area without the\nanalysis noticing. Record the level each point was resolved to, such as address,\nstreet or postcode, in a column beside it, and filter or weight by that level\nbefore measuring any distance shorter than the area itself.\n\n**Last year's regional totals change after a boundary update.** A report rerun\non unchanged historical data gives different figures per region from the ones\nfirst published. The points were joined to the current boundary layer, and since\nthen municipalities have merged, postcodes have split or a service area has been\nredrawn. Keep the raw coordinates rather than only the region they fell in,\nstore boundary layers with the dates they were valid, join each record to the\nboundary in force at its timestamp, and note in every report which boundary\nversion produced it.\n\n## Further reading\n\n- [OGC Standards](https://www.ogc.org/standards/) — the Open Geospatial\n  Consortium's catalogue of open geospatial standards, each with its\n  specification documents.\n- [Simple Feature Access – Part 1](https://www.ogc.org/standards/sfa/) — the\n  common geometry model of points, lines and polygons that databases and formats\n  share.\n- [EPSG Geodetic Parameter Dataset](https://epsg.org/) — the registry behind\n  codes such as 4326 and 3857, with the full definition of each reference\n  system.\n- [PROJ](https://proj.org/) — the open-source library that transforms\n  coordinates between reference systems, with its command-line tools and API.\n- [OGC API – Features](https://ogcapi.ogc.org/features/) — the OGC standard for\n  publishing and querying geospatial features over HTTP.\n\n\u003chttps://engineer.company/glossary/geospatial/\u003e\n","date_modified":"2026-10-20T21:59:50Z","description":"What makes data geospatial, the open standards that let it move between systems, and four ways location distorts reports and joins.","formats":{"gemtext":"https://engineer.company/glossary/geospatial/index.gmi","gopher":"https://engineer.company/glossary/geospatial/gophermap","html":"https://engineer.company/glossary/geospatial/","json":"https://engineer.company/glossary/geospatial/index.json","markdown":"https://engineer.company/glossary/geospatial/index.md","pdf":"https://engineer.company/glossary/geospatial/index.pdf"},"kind":"page","language":"en","title":"What does geospatial mean?","url":"https://engineer.company/glossary/geospatial/","version":1}