Skip to content
SciStack

Maps and geospatial data

Map projections, gridded earth data, and coordinates on the globe.

At 60° north a degree of longitude is half as long as at the equator, 56 km instead of 111 km, so treating longitude and latitude as x and y doubles every east-west distance in Oslo. The Mercator projection makes the same error in area, squared: it enlarges areas four times at 60° and 33 times at 80°, which is why Greenland looks as large as Africa, though Africa is 14 times larger.

Everything with a position on the Earth lands here: weather stations and the temperature field between them, the epicenters of an aftershock sequence, an ocean model compared with satellite swaths, the occurrence records of a species, the GPS stakes on a glacier. The questions are which coordinate reference system the numbers are in, how to convert them, how to draw them on a map, and how far apart two points are.

In Python, pyproj converts between coordinate reference systems with pyproj.Transformer.from_crs and measures distances on the ellipsoid with pyproj.Geod. Cartopy turns a Matplotlib axes into a map with a projection from cartopy.crs, and transform=ccrs.PlateCarree() tells each plotting call that its data are longitude and latitude. Gridded fields come as xarray datasets, stations and outlines as GeoPandas tables. In Julia, Proj.jl does the transformations and GeoMakie.jl draws maps with its GeoAxis.

Pass always_xy=True to every transformer. EPSG:4326, longitude and latitude on the WGS 84 datum that GPS uses, puts latitude first, and pyproj follows the standard unless told otherwise; a station in Oslo then lands in the Arabian Sea. Start with coordinate reference systems and one transformation, then a field drawn on a map with the right transform, then distances on the ellipsoid. The gridded data themselves are labeled multidimensional data, and the NetCDF and GeoTIFF files they arrive in are scientific file formats.

What belongs here

Data located on the Earth: coordinate reference systems and map projections, drawing fields and stations on maps, distances on the sphere, regridding, and working with gridded earth-science data. General figure design belongs to visualization; the file formats such data arrive in to data-formats.

0 tutorials by type and language

PythonJulia
Concept – –
Tool – –
Recipe – –
Visualization – –
Project – –