Planetary-scale answers, unlocked.
A Hands-On Guide for Working with Large-Scale Spatial Data. Learn more.
Authors
A coordinate reference system (CRS) defines how the numbers in a dataset map to real places on Earth. The pair (-122.4, 37.79) means nothing until a CRS says it is longitude and latitude in degrees on the WGS 84 datum, which puts it in downtown San Francisco. In GIS, "coordinate system" usually means the same thing. Every geospatial dataset has a CRS, and two datasets line up only when they share one or one is transformed into the other's.
A coordinate system is a set of axes, an origin, and units that assign numbers to positions. The four coordinate systems taught in mathematics are Cartesian (x, y, z on perpendicular axes), polar (a distance and an angle in the plane), cylindrical (polar plus a height), and spherical (a radius and two angles). The rectangular coordinate system on graph paper is the two-dimensional Cartesian case. None of these says where on Earth the origin sits.
A coordinate reference system adds that anchor. ISO 19111, the international standard for referencing by coordinates, defines a CRS as a coordinate system related to an object, the Earth, through a datum. The QGIS guide to coordinate reference systems puts it in practical terms: a CRS "defines how the two-dimensional, projected map in your GIS relates to real places on the earth." The OGC Simple Feature Access standard calls it a spatial reference system. In GIS, the three main types are geographic CRSs (latitude and longitude), projected CRSs (x and y on a flat map), and vertical CRSs (height or depth).
ISO 19111 builds every CRS from the same parts. The figure traces them for UTM zone 10N, the CRS that San Francisco data is measured in throughout this article.
ST_FlipCoordinates
A geographic coordinate system has no single scale. A degree of latitude is always about 111 km, while meridians converge toward the poles, so a degree of longitude covers 111.3 km at the equator, 88.1 km in San Francisco, and 23.1 km in Svalbard (query below). Area and distance computed directly on longitude and latitude are therefore wrong by an amount that grows with latitude.
No flat map keeps every property of a curved surface, so each projection picks what to preserve. Conformal projections such as Mercator and transverse Mercator keep local angles and shapes. Equal-area projections such as Albers and Equal Earth keep area. Equidistant projections keep distance along chosen lines. Nicolas Auguste Tissot's indicatrix, published in full in 1881, draws the distortion at each point as an ellipse, which is how the header image above shows circles of the same 800 km radius at different sizes and shapes.
A datum shift changes a point's coordinates because the reference frame changed. NAD 27, the older North American datum, sits on the Clarke 1866 ellipsoid, and in the walkthrough below a downtown San Francisco point moves 93.1 meters between NAD 27 and WGS 84. NAD 83 uses the GRS 1980 ellipsoid and stays fixed to the North American plate, while WGS 84 follows the International Terrestrial Reference Frame, so the two drift apart over time.
ISO 19111 separates two operations. A conversion changes coordinates within one datum, such as projecting WGS 84 latitude and longitude to UTM. A transformation moves coordinates between datums, uses empirically derived parameters or grids, and carries a stated accuracy. The IOGP Guidance Note 7-2 documents the formulas for both, from three-parameter shifts to grid-based methods such as NADCON and NTv2.
The EPSG Geodetic Parameter Dataset, maintained by the International Association of Oil & Gas Producers (IOGP), catalogs coordinate reference systems and transformations and assigns each a numeric code. An SRID, spatial reference identifier, is the code a database stores with a geometry, usually an EPSG code.
A code is shorthand. The full definition is written in Well-Known Text: WKT2, ISO 19162:2019 and OGC 18-010r11, describes the datum, ellipsoid, prime meridian, axes, units, conversion, and the area and scope of use. PROJJSON is the JSON encoding of WKT2, and GeoParquet stores each geometry column's CRS as PROJJSON, defaulting to OGC:CRS84 (WGS 84 in longitude, latitude order). An abridged WKT2 definition of UTM zone 10N:
PROJCRS["WGS 84 / UTM zone 10N", BASEGEOGCRS["WGS 84", ENSEMBLE["World Geodetic System 1984 ensemble", ..., ELLIPSOID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0]], CONVERSION["UTM zone 10N", METHOD["Transverse Mercator"], PARAMETER["Longitude of natural origin",-123], PARAMETER["Scale factor at natural origin",0.9996], PARAMETER["False easting",500000]], CS[Cartesian,2], ..., ID["EPSG",32610]]
The PROJ library, an Open Source Geospatial Foundation project, implements these operations in most open-source geospatial software. SpatialReference.org lists definitions for EPSG, ESRI, and other authorities in WKT and PROJJSON.
The World Geodetic System 1984 is the datum and geographic CRS used by GPS, maintained by the US National Geospatial-Intelligence Agency (NGA). EPSG:4326 stores latitude and longitude in degrees over the whole world. GeoJSON requires it, and most open datasets, including Overture Maps, publish in it.
Web Mercator is the projected CRS behind Google Maps, OpenStreetMap, and most web map tiles. It applies the spherical Mercator formulas to WGS 84 coordinates, which makes tiles fast to compute. The EPSG:3857 record describes its scope as web mapping and visualization and notes it is "not a recognised geodetic system." It covers latitudes between 85.06°S and 85.06°N, keeps local shape, and inflates area toward the poles.
Universal Transverse Mercator divides the world into 60 zones, each 6 degrees of longitude wide, numbered from 180°W. Each zone uses a transverse Mercator projection in meters with low distortion inside the zone. UTM zone 10N (EPSG:32610) covers 126°W to 120°W in the northern hemisphere, including San Francisco. On the WGS 84 datum, northern zones have EPSG codes beginning 326 and southern zones 327. Sentinel-2 and Landsat imagery is delivered in UTM.
The State Plane Coordinate System divides the United States into zones, one or more per state, each with a transverse Mercator or Lambert conformal conic projection on NAD 83, in meters or US survey feet. County parcel data and engineering drawings commonly arrive in State Plane, such as NAD83 / California zone 3 (EPSG:2227), a Lambert conformal conic CRS in US survey feet that covers San Francisco. NAD 83 is still the official US horizontal datum, and the National Geodetic Survey is replacing it with NATRF2022 (see the research section).
Equal-area projections such as Equal Earth (EPSG:8857) preserve area everywhere and distort shape. Use them for global maps of density or land cover, where area comparisons matter.
Raster data has a CRS too: a GeoTIFF stores it in georeferencing tags, a digital elevation model must share one with the vectors it joins, and lidar point clouds carry a horizontal and a vertical CRS. See raster vs vector data.
WherobotsDB handles CRSs with spatial SQL functions:
ST_Transform(geom, sourceCRS, targetCRS)
ST_SetSRID(geom, srid)
ST_SRID(geom)
ST_BestSRID(geom)
ST_AreaSpheroid(geom)
ST_DistanceSpheroid
ST_LengthSpheroid
The CRS transformation guide covers supported formats, grid files, and coordinate order.
This query transforms one location in downtown San Francisco:
SELECT ST_AsText(ST_Point(-122.4, 37.79)) AS wgs84, ST_AsText(ST_Transform(ST_Point(-122.4, 37.79), 'EPSG:4326', 'EPSG:3857')) AS web_mercator, ST_AsText(ST_Transform(ST_Point(-122.4, 37.79), 'EPSG:4326', 'EPSG:32610')) AS utm_10n
Web Mercator gives meters from the point where the equator meets the prime meridian, on a sphere. UTM gives meters east of a false origin 500,000 meters west of the 123°W central meridian, and meters north of the equator.
This query applies the EPSG transformation NAD27 to WGS 84 (4), a geocentric translation of (-8, 160, 176) meters on the Clarke 1866 ellipsoid derived at 405 stations across the contiguous United States, and measures how far the point moves:
SELECT ST_AsText(ST_Transform(ST_Point(-122.4, 37.79), '+proj=longlat +ellps=clrk66 +towgs84=-8,160,176,0,0,0,0 +no_defs', 'EPSG:4326')) AS nad27_point_in_wgs84, ROUND(ST_DistanceSpheroid(ST_Point(-122.4, 37.79), ST_Transform(ST_Point(-122.4, 37.79), '+proj=longlat +ellps=clrk66 +towgs84=-8,160,176,0,0,0,0 +no_defs', 'EPSG:4326')), 1) AS shift_m
A NAD 27 coordinate read as WGS 84 lands 93.1 meters from the true position. EPSG lists this transformation's accuracy as 5 to 6 meters per axis. Grid-based methods such as NADCON, documented in the IOGP guidance note, model the shift point by point.
This query measures three of the largest Overture buildings in San Francisco's Financial District four ways:
SELECT ST_SRID(geometry) AS srid, ST_BestSRID(geometry) AS best_srid, ST_Area(geometry) AS area_sq_degrees, ROUND(ST_Area(ST_Transform(geometry, 'EPSG:4326', 'EPSG:32610')), 1) AS area_sq_m_utm10n, ROUND(ST_Area(ST_Transform(geometry, 'EPSG:4326', 'EPSG:3857')), 1) AS area_sq_m_web_mercator, ROUND(ST_AreaSpheroid(geometry), 1) AS area_sq_m_spheroid FROM wherobots_open_data.overture_maps_foundation.buildings_building WHERE bbox.xmin >= -122.40 AND bbox.xmax <= -122.395 AND bbox.ymin >= 37.79 AND bbox.ymax <= 37.795 ORDER BY area_sq_m_spheroid DESC LIMIT 3
Overture geometries carry SRID 4326, and ST_BestSRID picks UTM zone 10N. Area in square degrees is a tiny number with no physical unit. UTM and the spheroid agree within 0.1%, while Web Mercator overstates each building by about 60%.
ST_BestSRID
The error depends on latitude. This query takes eight Overture division boundaries, from Singapore to Nordenskiöld Land in Svalbard, and measures each four ways: EPSG:4326 planar area at the equatorial 111.32 km per degree, Web Mercator, the local UTM zone (passed as a PROJ string), and the WGS 84 ellipsoid. It also measures one degree of longitude at each centroid.
WITH pick AS ( SELECT * FROM VALUES ('Singapore', 103.82, 1.35, 'f29ee54e-0684-466c-ac6b-38549837eeaa', '+proj=utm +zone=48 +datum=WGS84 +units=m'), ('Nairobi', 36.82, -1.29, '288a59f2-163f-48f2-a942-1d5096088685', '+proj=utm +zone=37 +south +datum=WGS84 +units=m'), ('San Francisco', -122.44, 37.76, '273bc9a0-96a1-402c-992c-84f5c2f212cb', '+proj=utm +zone=10 +datum=WGS84 +units=m'), ('Paris', 2.35, 48.86, '97b66514-3f41-47ac-a348-9cfd51d983d5', '+proj=utm +zone=31 +datum=WGS84 +units=m'), ('Oslo', 10.75, 59.91, '7eafc338-ef1d-4c71-bd29-be3e428a68b7', '+proj=utm +zone=32 +datum=WGS84 +units=m'), ('Reykjavik', -21.90, 64.13, 'c17ee27c-ecab-4a8a-b915-3c42c5dc1d28', '+proj=utm +zone=27 +datum=WGS84 +units=m'), ('Tromso', 18.95, 69.65, '5c8ccf57-b128-4295-a1e9-29f35cbd6361', '+proj=utm +zone=34 +datum=WGS84 +units=m'), ('Nordenskiold Land', 15.63, 78.22, '93d3102d-7f64-471c-9f5c-d528ebe47fd0', '+proj=utm +zone=33 +datum=WGS84 +units=m') AS t(place, lon, lat, id, utm) ), f AS ( SELECT /*+ BROADCAST(pick) */ pick.place, pick.utm, a.geometry AS g FROM wherobots_open_data.overture_maps_foundation.divisions_division_area a JOIN pick ON a.id = pick.id AND a.bbox.xmin <= pick.lon AND a.bbox.xmax >= pick.lon AND a.bbox.ymin <= pick.lat AND a.bbox.ymax >= pick.lat ), m AS ( SELECT place, utm, g, ST_Centroid(g) AS c, ST_Area(g) AS sq_deg, ST_Area(ST_Transform(g, 'EPSG:4326', 'EPSG:3857')) AS merc_m2, ST_Area(ST_Transform(g, 'EPSG:4326', utm)) AS utm_m2, ST_AreaSpheroid(g) AS sph_m2 FROM f ) SELECT place, ROUND(ST_Y(c), 2) AS lat, ST_BestSRID(g) AS best_srid, ROUND(sq_deg, 5) AS sq_degrees, ROUND(sq_deg * 111.32 * 111.32, 1) AS km2_4326_planar, ROUND(merc_m2 / 1e6, 1) AS km2_web_mercator, ROUND(utm_m2 / 1e6, 1) AS km2_utm, ROUND(sph_m2 / 1e6, 1) AS km2_spheroid, ROUND(sq_deg * 111.32 * 111.32 * 1e6 / sph_m2, 2) AS planar_ratio, ROUND(merc_m2 / sph_m2, 2) AS mercator_ratio, ROUND(100 * (utm_m2 / sph_m2 - 1), 3) AS utm_err_pct, ROUND(ST_DistanceSpheroid(ST_Point(ST_X(c), ST_Y(c)), ST_Point(ST_X(c) + 1, ST_Y(c))) / 1e3, 1) AS km_per_deg_lon, ROUND(ST_Distance(ST_Transform(ST_Point(ST_X(c), ST_Y(c)), 'EPSG:4326', 'EPSG:3857'), ST_Transform(ST_Point(ST_X(c) + 1, ST_Y(c)), 'EPSG:4326', 'EPSG:3857')) / 1e3, 1) AS km_per_deg_lon_web_mercator FROM m ORDER BY lat
The query ran in 19.5 seconds. Three patterns come out of it:
Grids such as H3 take WGS 84 longitude and latitude, and open datasets in the Havasu catalog already carry SRID 4326.
ST_AreaSpheroid
Every method in geospatial analysis rests on a CRS. The research runs from sixteenth-century navigation charts to reference frames that track plate motion to the millimeter.
John P. Snyder's Map Projections: A Working Manual (USGS Professional Paper 1395, 1987), a standard reference for projection formulas, traces the history. Gerardus Mercator announced his projection in 1569 on an 18-sheet world map built so that a line of constant compass bearing plots as a straight line. Johann Heinrich Lambert described the transverse Mercator, the Lambert conformal conic, and the Lambert azimuthal equal-area projections in 1772. Carl Friedrich Gauss developed the ellipsoidal form of transverse Mercator in 1822, and Louis Krüger reworked it in 1912, which is why Europe calls it Gauss-Krüger. The US Army adopted the UTM grid in 1947 for large-scale maps of the whole world.
Charles Karney's Transverse Mercator with an accuracy of a few nanometers (Journal of Geodesy, 2011) extended it to higher order, with errors below 5 nm within 3,900 km of the central meridian, and gave an exact method accurate to 9 nm over the whole ellipsoid.
Goldberg and Gott's Flexion and Skewness in Map Projections of the Earth (Cartographica, 2007) scored world maps on six error types, adding flexion and skewness to the classic area, shape, and distance measures. New projections still appear: Šavrič, Patterson, and Jenny introduced the Equal Earth map projection (International Journal of Geographical Information Science, 2019) as an equal-area alternative for world maps, and EPSG registered it as 8857.
The alternative to projecting is to compute on the ellipsoid. Karney's Algorithms for geodesics (Journal of Geodesy, 2013) gives accurate, robust, and fast solutions to the direct and inverse geodesic problems, along with integral properties such as the area of geodesic polygons. The walkthrough uses ST_AreaSpheroid, an ellipsoidal measure of this type, as its reference.
Battersby, Finn, Usery, and Yamamoto's Implications of Web Mercator and Its Use in Online Mapping (Cartographica, 2014) examines how it became the dominant projection for online maps, and why Mercator has long been considered a poor choice for general-purpose world maps. The same year, NGA issued an advisory notice on Web Mercator stating that NGA does not endorse or support the spherical Web Mercator projection and warning of geolocation errors of up to 40,000 meters in Department of Defense systems. Bernhard Jenny's Adaptive Composite Map Projections (IEEE TVCG, 2012) proposed changing the projection with map scale: equal-area when zoomed out, conformal when zoomed in.
The history of the EPSG Dataset begins in 1985, when geomatics leaders from European oil companies formed the European Petroleum Survey Group to share consistent CRS definitions. The dataset became public in 1993, and maintenance passed to the IOGP Geomatics Committee in 2005. The OGC's Coordinate Transformation Services specification (OGC 01-009, 2001) extended Well-Known Text with authority codes and compound CRSs. ISO 19111 now sets the conceptual model, in its third edition since 2019, and WKT2 encodes that model as text. The 2019 edition added coordinate operations that account for crustal motion over time, so a coordinate can carry the epoch at which it was valid.
The ground moves. The Australian plate drifts about 7 cm a year to the north-east, so by 2020 Australia's 1994 datum differed from global coordinates by about 1.8 meters. Geoscience Australia responded with two systems: GDA2020, a static datum fixed at 1 January 2020, and ATRF2014, a time-dependent frame that moves with the plate.
The global reference is the International Terrestrial Reference Frame. Altamimi and colleagues' ITRF2020 (Journal of Geodesy, 2023) refined the modeling of nonlinear station motions. WGS 84 follows it through successive realizations. Konyk, Smith, Wong, and Tollefson's Thirty Years of Maintaining WGS 84 with GPS (NAVIGATION, 2025) describes how NGA aligned WGS 84 (G2139) to ITRF2014 in 2021 and WGS 84 (G2296) to ITRF2020 in January 2024, a shift of about 6.3 mm between the two. EPSG models WGS 84 as a datum ensemble of these realizations with an accuracy of 2 meters, which is why EPSG:4326 alone cannot pin a coordinate to the centimeter.
North America is going the same way. The National Geodetic Survey's Blueprint for 2022, Part 1 (NOAA Technical Report NOS NGS 62, 2017) replaces the three NAD 83 frames with four plate-fixed frames: NATRF2022, PTRF2022, CTRF2022, and MTRF2022. NAD 83's origin sits about 2.2 meters from the Earth's center, and the new frames are geocentric. Each is tied to the ITRF through a model of its plate's rotation. For data teams, the open problem is bookkeeping: storing the realization and epoch with each coordinate, and choosing transformations that account for time.
No single projected CRS keeps distortion low across a continent, so global work measures each feature in its own zone or on the ellipsoid. The walkthrough passes each feature its UTM zone as a column, a pattern that runs per row in parallel on any number of features. Jia Yu, Jinxuan Wu, and Mo Sarwat's GeoSpark (ACM SIGSPATIAL 2015) introduced the distributed spatial data model behind this, and Yu, Zongsi Zhang, and Sarwat's Spatial data management in Apache Spark (GeoInformatica, 2019) described its partitioning, indexing, and join design. GeoSpark became Apache Sedona, the engine under WherobotsDB.
Spatial partitioning depends on the CRS too: grid cells laid out in degrees shrink toward the poles. Kimerling, Sahr, White, and Song's Comparing geometrical properties of global grids (Cartography and Geographic Information Science, 1999) measured how cell area and shape vary across discrete global grids, the trade-off that hierarchical grids such as H3 manage. Table formats now carry the CRS in the schema: a Havasu geometry column stores one CRS for every value and rejects a write with a mismatched SRID. Iceberg v3 gets native geo types covers the format change.
Transform, measure, and join data across coordinate reference systems with a Wherobots free trial at cloud.wherobots.com.
In GIS, a coordinate system, or coordinate reference system (CRS), defines how the numbers in a dataset map to locations on Earth. It specifies a model of the Earth’s shape (an ellipsoid and datum), the units, the axis order, and, for flat maps, the projection. Two datasets line up only when they share a CRS or one is transformed into the other’s.
A coordinate system is a set of axes and units, such as x and y in meters or latitude and longitude in degrees. A coordinate reference system adds a datum that anchors those axes to the Earth. In everyday GIS use, the two terms mean the same thing.
A geographic coordinate system locates points on a model of the Earth’s curved surface with latitude and longitude in degrees, for example WGS 84 (EPSG:4326). A projected coordinate system flattens the Earth onto a plane and uses x and y in linear units such as meters, for example UTM zone 10N (EPSG:32610). Distance and area calculations need a projected or geodesic method.
CRS stands for coordinate reference system. EPSG refers to the EPSG Geodetic Parameter Dataset, maintained by the International Association of Oil & Gas Producers (IOGP), which assigns numeric codes to coordinate reference systems. EPSG:4326 is WGS 84 latitude and longitude, and EPSG:3857 is Web Mercator.
WGS 84 is the World Geodetic System 1984, a global datum and geographic coordinate system used by GPS, identified as EPSG:4326. UTM, Universal Transverse Mercator, is a projected system that divides the world into 60 zones, each 6 degrees of longitude wide, with coordinates in meters. A UTM zone on the WGS 84 datum, such as zone 10N, has its own EPSG code (32610).
Google Maps displays maps in Web Mercator (EPSG:3857), a projected system built on WGS 84. The latitude and longitude coordinates that Google Maps shows and accepts are WGS 84 degrees.
Check the dataset’s metadata: a Shapefile’s .prj file, a GeoTIFF’s georeferencing tags, or a GeoParquet file’s geometry metadata. In Wherobots, ST_SRID returns the code stored on a geometry. To look up a code by name or area, search the EPSG registry at epsg.org or spatialreference.org.
In mathematics, the common types are Cartesian (x, y, z), polar (distance and angle), and spherical (radius and two angles). In GIS, the main types of coordinate reference systems are geographic (latitude and longitude), projected (x and y on a flat map), and vertical (height or depth).
A coordinate system is a set of axes, an origin, and units that assign a unique set of numbers to every position. On a graph that means x and y. On the Earth it means latitude and longitude, or eastings and northings in meters, plus a datum that ties the numbers to the planet.
The four coordinate systems taught in mathematics and physics are Cartesian (x, y, z on perpendicular axes), polar (a distance and an angle in the plane), cylindrical (polar coordinates plus a height), and spherical (a radius and two angles). Geographic latitude and longitude are a form of spherical coordinates measured on an ellipsoid.
The State Plane Coordinate System is a set of projected coordinate systems for the United States, with one or more zones per state. Each zone uses a transverse Mercator or Lambert conformal conic projection on the NAD 83 datum, in meters or US survey feet. San Francisco falls in California zone 3, EPSG:2227 in feet.
Web Mercator is a conformal cylindrical projection: it keeps local angles by stretching east-west and north-south scale equally as latitude increases. Area grows by the square of that stretch, In Wherobots, Oslo at 60 degrees north measures 3.98 times larger in EPSG:3857 than on the WGS 84 ellipsoid.
A datum shift is the change in a point’s coordinates when it moves from one datum to another, such as from NAD 27 to WGS 84. The ground position stays the same, and the latitude and longitude change because each datum places its ellipsoid differently. In Wherobots, a downtown San Francisco point moves 93.1 meters between NAD 27 and WGS 84. Between the two most recent WGS 84 realizations, G2139 and G2296, NGA reports a shift of about 6.3 mm.
What is Context Engineering for Physical AI?
Context engineering is choosing what an AI model receives at each step. How it works, how it compares to RAG, and what changes when the context is real places.
What is an Ontology? Definition, Parts, Spatial Ontologies
An ontology is a formal model of the things in a domain and how they relate. Its parts, how it differs from a taxonomy or knowledge graph, and what makes one spatial.
What is H3? Uber’s Hexagonal Spatial Index
H3 is Uber's open-source hexagonal grid for indexing locations on Earth. How the H3 index works, its 16 resolutions, H3 vs S2, geohash and quadkeys, and H3 in SQL.
share this article
Awesome that you’d like to share our articles. Where would you like to share it to: