Geodesy

geodetic_engine.geodesy transforms coordinates. It is a layer over pyproj’s Transformer: PROJ does the computation, and this module checks the result can be trusted before returning it. It also gives the grid convergence and scale factor at points of a projected CRS; see Projection factors.

Use it when you need coordinates in another CRS and have to be able to say which operation produced them, with what accuracy, from which database.

Use plain pyproj instead when you want PROJ to pick an operation for you and an unstated accuracy is acceptable, for example drawing a map. This module refuses to do that. See Design guarantees.

The API in one table

You want to

Use

Transform points once

transform()

Transform many batches with one operation

Transformation

See every operation PROJ offers between two CRSs

available_operations()

Inspect a CRS’s axes, units, dimension, dynamism

CoordinateReferenceSystem

Read coordinates and provenance from a result

TransformationResult

Transform geometries as WKT, WKB, EWKB, GeoJSON or Esri JSON

Transformation.transform_geometry

Read, write or round geometries without a CRS change

geodetic_engine.geodesy.geometry

Compose or collapse Helmert transformations

geodetic_engine.geodesy.utils

Get the grid convergence and scale factor at points

projection_factors()

Turn azimuths between true and grid north

ProjectionFactors

Rules this module enforces

  1. A datum change must name its operation, as an EPSG code, a candidate from available_operations, a stated OSDU payload, or through a bound CRS. Otherwise: AmbiguousOperationError.

  2. The operation you name is the operation applied. If PROJ builds something else: OperationNotAvailableError.

  3. No ballpark results: BallparkTransformationError.

  4. No silent fallback when a grid is missing: MissingGridError.

  5. A time-dependent operation needs a coordinate epoch: MissingCoordinateEpochError.

  6. Values are xy in and out: longitude before latitude, easting before northing, then height, whatever axis order the CRS declares.

Pages in this section