Cartography FAQ
Frequently asked questions about GIS, projections, datums, and cartographic application development.
What is the difference between WGS84 and ETRS89?
WGS84 is the global datum adopted by GPS; ETRS89 is the European datum anchored to the Eurasian tectonic plate. The practical difference is less than 1 meter in 2024 (the Eurasian plate moves about 2.5 cm/year relative to the Earth's center in ITRF). For standard topographic applications the two datums are interchangeable; for high-precision geodetic applications (monitoring networks, crustal deformation) the distinction is fundamental. INSPIRE cartography uses ETRS89.
How do I convert from WGS84 geographic coordinates to UTM?
The conversion requires choosing the correct UTM zone (for Italy: zone 32N for the western part, zone 33N for the eastern part), then applying the transverse Mercator projection. In Python: from pyproj import Transformer; t = Transformer.from_crs("EPSG:4326", "EPSG:32632"); e, n = t.transform(lat, lon). EPSG:32632 identifies UTM zone 32N on WGS84. Note: the transform function of pyproj ≥ 2.2 accepts coordinates in the CRS order (for EPSG:4326 that is latitude, longitude).
What are EPSG codes and where do I find them?
EPSG codes are unique numeric identifiers assigned to coordinate reference systems (CRS), projections, datums, and ellipsoids by the IOGP registry (formerly EPSG). The registry is available at epsg.io (with descriptions and transformations) and epsg.org (the official IOGP site). Key codes for Italy: EPSG:4326 (WGS84 geographic), EPSG:32632 (UTM 32N WGS84), EPSG:32633 (UTM 33N WGS84), EPSG:3857 (Web Mercator), EPSG:3003 (Gauss-Boaga West), EPSG:3004 (Gauss-Boaga East), EPSG:4258 (ETRS89 geographic).
What is the difference between GPS elevation and elevation above sea level?
GPS provides ellipsoidal height (h): the vertical distance from the WGS84 ellipsoid. Topographic maps use orthometric height (H): the distance from the geoid (approximation of mean sea level). The relationship is H = h - N, where N is the geoid undulation. The official Italian geoid model (ITALGEO2005, distributed by IGM) provides N with centimeter precision. In Italy N typically ranges between +30 m and +50 m (the geoid lies 30-50 m above the WGS84 ellipsoid).
Why are GeoJSON coordinates in longitude-latitude order rather than latitude-longitude?
RFC 7946 (August 2016) standardized GeoJSON with longitude-latitude (X, Y) order, aligned with Cartesian geometry convention (horizontal X axis = East, vertical Y axis = North). This contrasts with geographic tradition (latitude first, then longitude) and with OGC standards. Many APIs (including the OSM Overpass API) return GeoJSON objects in lon-lat order; JavaScript libraries differ: Leaflet uses lat-lon, Mapbox GL JS and turf.js use lon-lat. Always verify the convention before using coordinates.
How do I choose the right cartographic scale for my application?
Scale depends on geographic extent and required detail level. Guidelines: 1:5,000–1:10,000 for urban detail (cadastre, utility networks); 1:25,000 for hiking and outdoor (standard IGM map); 1:50,000–1:100,000 for territorial planning; 1:250,000–1:500,000 for regional overviews; 1:1,000,000+ for national or global cartography. For web applications, the equivalent scale is given by zoom level: zoom 15-17 corresponds roughly to 1:5,000–1:2,000; zoom 13-14 to 1:25,000–1:50,000.
How does UTM projection work and what are its limitations?
UTM divides the Earth into 60 zones of 6° longitude. In each zone it applies the transverse Mercator projection with central scale factor k₀ = 0.9996 (scale reduction along the central meridian to balance distortions). Maximum linear distortion is 1 part in 2,500 at zone extremities (±3°), acceptable for most topographic applications. Limitations: not suitable for polar regions (UTM limit: 84°N, 80°S, where UPS is used); potential discontinuities at zone boundaries (e.g., between UTM 32N and UTM 33N in Italy); not suitable for datasets spanning multiple zones without reprojection.
How do I read an IGM 1:25,000 topographic map?
The IGM 1:25,000 map is organized in numbered sheets according to the 25V or 25DB division. Main elements: contour lines (every 25 m, with index contours every 125 m in bold); UTM-ETRS89 grid in km (blue grid, with Easting and Northing coordinates at margins); geographic graticule in degrees (black meridians and parallels at borders); conventional symbol legend (see IGM specifications at igmi.org); magnetic declination value with reference date (for compass-to-map conversion).
What is a datum and how is it specified in a GIS file?
A datum defines the shape and position of the ellipsoid relative to the real Earth. In a GIS file, the datum is specified as part of the CRS. In Shapefile it is written in the .prj file as WKT; in GeoTIFF it is embedded in GeoTIFF metadata; in GeoPackage it is in the gpkg_spatial_ref_sys table. The WKT string includes ellipsoid parameters (semi-major axis, flattening) and rotation/translation parameters relative to ITRF. In EPSG codes, the datum is a CRS component: EPSG:32632 uses WGS84 datum, EPSG:3003 uses Roma 1940 datum, EPSG:25832 uses ETRS89 datum.
What is a DEM and how is it generated?
A DEM (Digital Elevation Model) is a digital representation of terrain as an elevation grid. Generated via: (1) aerial or drone photogrammetry (SfM software such as Agisoft Metashape, OpenDroneMap); (2) LiDAR data (point cloud classification with LAStools or PDAL to extract bare earth); (3) radar interferometry (InSAR, e.g., Sentinel-1 data processed with SNAP); (4) SRTM data (NASA mission, available at earthexplorer.usgs.gov). The resulting DEM is typically in GeoTIFF format with WGS84 datum and resolution depending on the technique (sub-metric for LiDAR to 30 m for SRTM1).
How do I calculate the distance between two geographic points?
For short distances (< 100 km) the planar approximation (Euclidean formula in UTM) is acceptable. For greater distances use the Haversine formula (spherical distance) or the Vincenty formula (more precise, on ellipsoid). In Python: from pyproj import Geod; g = Geod(ellps='WGS84'); az12, az21, dist = g.inv(lon1, lat1, lon2, lat2). The inv function of pyproj returns azimuth and geodetic distance in meters on the WGS84 ellipsoid.
What is OpenTopoMap and how is it used?
OpenTopoMap is a topographic map rendering service based on OSM and SRTM data, with a style resembling traditional topographic maps (contour lines, conventional symbols, toponymy). Tiles at URL https://tile.opentopomap.org/{z}/{x}/{y}.png (copyright OpenTopoMap and OSM contributors). Usable as a base layer in Leaflet, OpenLayers, QGIS. Permitted for non-commercial applications with attribution.
What is the difference between Shapefile and GeoPackage?
Shapefile (ESRI) is the legacy vector format with serious limitations: field names max 10 characters, file max 2 GB, one geometry type per file, ambiguous character encoding. GeoPackage (OGC) is the modern SQLite-based standard: supports UTF-8, long names, mixed geometries, multiple layers in one file, no practical size limit. OGC recommends migrating to GeoPackage for new projects.
How do I use PostGIS for spatial queries?
PostGIS adds spatial functions to PostgreSQL. Example queries: SELECT ST_Distance(ST_GeomFromText('POINT(11.2558 43.7696)', 4326)::geography, ST_GeomFromText('POINT(12.4964 41.9028)', 4326)::geography); returns the distance in meters between Florence and Rome on the WGS84 spheroid. SELECT * FROM municipalities WHERE ST_Contains(geom, ST_GeomFromText('POINT(11.2558 43.7696)', 4326)); returns the municipality containing a given point. The geography type is more precise than geometry for long distances because it uses the ellipsoid.
How do I set the CRS in a QGIS layer and reproject it?
In QGIS, set a layer's CRS via Layer Properties → Source → Layer CRS. To reproject (save in a different CRS): right-click the layer → Save As → choose the output CRS. From the command line with GDAL: ogr2ogr -t_srs EPSG:32632 output.gpkg input.shp. For rasters: gdalwarp -t_srs EPSG:32632 output.tif input.tif. Note: reprojection changes the coordinates, not just the CRS label.
What does conformal (isogonal) vs. equal-area mean for a projection?
A conformal projection preserves local angles: small shapes are reproduced without angular distortion. Examples: UTM, Mercator. An equal-area projection preserves areas: the area of each polygon is proportional to the real-world area. Examples: Albers Equal Area, Lambert Azimuthal Equal Area. No planar projection can simultaneously be both conformal and equal-area. The choice depends on use: conformal for navigation and angular measurements; equal-area for area-based statistical analysis.