CRS & projections
Coordinate systems, EPSG codes, reprojection, and the silent errors they cause.
A coordinate is two numbers and a promise about what they mean. The coordinate reference system is that promise: which ellipsoid, positioned where, measured in what units, over which part of the world. Drop it and the numbers survive perfectly while their meaning does not.
Almost everything in this topic fails quietly. A missing CRS does not raise. A wrong one does not raise. An area computed in degrees returns a number that looks like a number. The symptom arrives later and somewhere else — a join that matches nothing, a map sitting off the coast of Ghana, a buffer of 500 that turns out to be 500 degrees.
The order below is the one that works. The concepts settle what a CRS is and how a projected one differs from a geographic one; the how-to guides cover the operations you run daily — assigning, reprojecting, choosing a projected CRS, measuring on the ellipsoid; and the fixes are filed under what you saw rather than what caused it, because the cause is the part you do not know yet.
🧭 Start with the concepts
The ideas the how-to guides below assume you already have.
- EPSG Codes Explained: How to Choose the Right CRS in Python
- Coordinate Reference Systems (CRS) Explained for Python GIS
- Coordinate Precision and Floating Point in GIS Explained
- Raster Resampling Explained: Nearest, Bilinear and When Each Is Wrong
- Choosing a Map Projection for Display: What Web Mercator Distorts
- Projected vs Geographic CRS: What Actually Changes When You Reproject
Show every concept in this topic
- Vertical Datums Explained: Why Your Elevations Are Off
- CRS in DuckDB: Why ST_Transform Moves Your Data to the Wrong Place
- 0–360 or −180–180: Longitude Conventions in Gridded Data Explained
- Tidal datums explained: which shoreline is the shoreline
- Georeferencing Explained: Turning a Scanned Map into Spatial Data
- Ground Control Points Explained: What Makes a Good One
- Georeferencing Transformations Explained: Affine, Polynomial and Thin-Plate Spline
- Old Map Projections Explained: What Grid Was a Historical Map Drawn On?
- Polar Stereographic Projections Explained
- Latitude and Longitude Explained
⚙️ Then do the task
Step-by-step walkthroughs with code you can copy and adapt.
- How to Calculate Area and Distance in GeoPandas (Correctly)
- How to Reproject Spatial Data in Python (GeoPandas)
- How to Standardise and Repair CRS Across a Folder of Files in Python
- How to Reproject a Raster in Python with Rasterio
- How to Add a Basemap to a GeoPandas Map with contextily
- How to Choose the Right Projected CRS for Your Study Area
Show every how-to guide in this topic
- How to Set, Assign and Convert CRS in GeoPandas (set_crs vs to_crs)
- How to Measure Distance Accurately in Python: Geodesic vs Projected
- How to Work with a Custom or Local CRS in Python
- How to Reproject Between Datums Correctly (and Why the Grid File Matters)
- How to Take an Area-Weighted Mean over a Latitude–Longitude Grid
- How to reduce coordinate precision safely in Python
- How to Pick Ground Control Points for a Scanned Map in Python
- How to Convert Latitude and Longitude to UTM in Python
🔧 When it breaks
The errors this topic produces, with the cause explained rather than just the command.
- Spatial Join Returns Empty Results in GeoPandas: How to Fix It
- Why Does My GeoPandas Map Look Upside Down?
- How to Fix CRS Mismatch in GeoPandas
- GeoPandas "Geometry Is in a Geographic CRS" Warning: How to Fix It
- Cannot Transform Naive Geometries to CRS: How to Fix It in GeoPandas
- My Points Plot in the Ocean: Fixing Swapped Latitude and Longitude
Show every fix in this topic
- PostGIS Write Fails on SRID or Geometry Type: How to Fix It
- Raster and Vector Do Not Line Up in Python: How to Fix It
- My Folium Map Is Blank or Will Not Display: How to Fix It
- Slope Values Are Wrong or Absurdly Steep
- Street Network Routing Returns Absurd Distances
- laspy Returns the Wrong Coordinates: Scale, Offset and CRS
- My Tiles Are Offset or in the Wrong Place
- Fixing Coordinates in the Wrong Order in an API Response
- Fixing a NetCDF Map That Is Shifted, Flipped or Split at 180°
- Fixing H3 Cells in the Wrong Place: Latitude and Longitude Order
- Fixing H3 Hexagons That Stretch Across the Map at the Antimeridian
- Fixing Catchment Areas That Are Wrong on a Latitude–Longitude DEM
- Metadata extents and dates do not match the data
- CityJSON coordinates come out tiny or at the origin
- A coastline or EEZ breaks at the antimeridian
- Siting Mask Removes Everything
- Forest Area Wrong in Degrees
- Georeferenced Map Lands in the Wrong Place
- Low GCP Residuals, but the Georeferenced Map Is Still Wrong
- Old Map Is Offset from Modern Data
- Polar Data Lands in the Wrong Place
- MODIS Sinusoidal Tiles Do Not Line Up
- Storm Track Crosses the Dateline: Lines Across the Whole Map
- Why Are the Lines on My Flow Map in the Wrong Place?
- Why Is My Wildfire Area Too Large?
- Why Are My Land Cover Areas Wrong in Degrees?
- Why Are My HRRR Wind Directions Wrong?
- Why Do My Wind Arrows Point the Wrong Way on a Projected Map?
- Fixing Population Densities That Are Wrong on Latitude-Longitude Grids
- Fixing a Population Total That Changes After Reprojecting the Grid
- Fixing Empty SST Selections on Grids with 0–360 Longitudes
- Fixing Distances to Faults That Come Out in Degrees or Too Long
- Fixing Earthquake Maps and Statistics Split at the Antimeridian
- Fixing Cartopy Points Plotted in the Wrong Place
- NBI Coordinates Land in the Wrong Place: Packed Degrees, Minutes and Seconds
- Hurricane Tracks in the Wrong Hemisphere: HURDAT2's N and W Suffixes
- Pacific Hurricane Tracks Streak Across the Map at 180 Degrees
Learning paths through this topic
A curated route rather than a list — the guides in the order that builds on itself.
- Terrain & Elevation
- Networks & Routing
- Raster Analysis
- Spatial SQL & PostGIS
- Making Maps
- GIS Data Cleaning
- LiDAR & Point Clouds
- Publishing Web Maps
- DuckDB for Spatial Data
- Serving Spatial Data
- Gridded & Climate Data
- H3 & Global Grids
- Hydrology & Watersheds
- Geoprivacy & Anonymisation
- Metadata, Licensing & Provenance
- 3D & Buildings
- Coastal & Marine
- Renewable Energy Siting
- Forest Monitoring
Related topics
Subjects that keep coming up alongside this one, most overlap first.