geodetic-engine¶
Coordinate transformations you can defend.
geodetic-engine is a Python library built on PROJ and
pyproj. PROJ does the arithmetic.
This package decides whether PROJ’s answer can be trusted, refuses it when it
cannot, and records exactly how every coordinate was produced.
from geodetic_engine.geodesy import transform
result = transform("EPSG:4230", "EPSG:4326", (2.5, 63.5), operation="EPSG:1612")
result.coordinates # ((2.49818..., 63.49961...),) lon, lat in degrees
result.operation.name # 'ED50 to WGS 84 (23)'
result.pipeline # the exact PROJ pipeline that ran
A wrong coordinate that looks right is worse than an error, because nobody checks it again. So a datum change must name its operation, a ballpark approximation is refused, a missing grid is an error, and a time-dependent operation needs a coordinate epoch.
What the package does¶
Transforms coordinates with a stated operation. Between geographic, projected, vertical, compound and engineering CRSs, from EPSG or from your own definitions. A datum change names its transformation, and the one named is the one applied.
Refuses results it cannot vouch for. Ballpark approximations, a missing grid, a time-dependent operation without a coordinate epoch: each raises an error that says what was wrong, instead of returning a plausible number.
Lists what the PROJ database holds. CRSs, transformations, datums, ellipsoids, units, methods, coordinate systems and grid files, filtered by area, datum, accuracy, deprecation and more, as tables or PROJJSON.
Records provenance. Every result carries the applied operation, its accuracy, the grids used, the coordinate epoch, the exact PROJ pipeline, and fingerprints of the
proj.dbthat answered, so a result can be reproduced and audited later.Reads and writes OSDU
persistableReferences, and transforms with exactly the CRS or operation a payload states.Evaluates projection factors. Grid convergence and point scale factor at any point of a projected CRS, with the sign convention stated.
Positions wellbores. A directional survey, by minimum curvature, georeferenced in a CRS on its own datum, with dogleg severity and a 3D view.
Builds custom PROJ databases. Adds an organisation’s CRSs and transformations, from a Georepository register or an OSDU catalogue, to a validated copy of PROJ’s
proj.db.Works around known PROJ and EPSG problems, such as engineering CRS axis order, and documents each workaround with the condition for removing it.
Modules¶
Module |
Purpose |
|---|---|
Transformations, CRS inspection, operation lookup, results and provenance, projection factors |
|
Discover CRSs, operations, datums, ellipsoids, units, methods, coordinate systems and grids in the PROJ database |
|
Well trajectories from directional surveys: minimum curvature, georeferencing in a CRS, 3D plots |
|
Seismic bin grids: P6 conversion, four-corner squaring and QC, outlines |
|
Parse and emit OSDU |
|
Authenticated client for a Georepository API |
|
Build a |
|
Build a |
For coordinate transformations, PROJ does all the numerical work, and the package is a layer over pyproj that decides which operation runs, checks the result, and records how it was produced. It is a library, not a service: transformations run locally and never contact the Georepository. See Architecture.
When to use it¶
Use it when you must be able to say which operation produced a coordinate, with what accuracy, and from which database. Use plain pyproj when PROJ may pick the operation for you and an unstated accuracy is acceptable, for example when drawing a map. Design guarantees lists what this package does differently from pyproj.
Requirements¶
Python 3.13 or later.
PROJ 9.9.0 and pyproj 3.8.0, built against each other. The EPSG dataset in
proj.dbis part of every answer, so the versions are pinned. The devcontainer installs both; see Installation.Licensed under Apache 2.0.
Start here¶
Install the pinned PROJ and pyproj, transform your first point, and learn the ideas the rest of the documentation assumes you know.
Task-oriented guides for every module: transformations, projection factors,
well trajectories, seismic bin grids, the Georepository client, and custom
proj.db builds.
Worked notebooks that run during every documentation build, so every number shown is real output.
Every public class and function, generated from the docstrings.
geodetic-projdb and geodetic-osdudb: every option, with the example
configuration files.
What this package works around in PROJ and the EPSG dataset, why, and when each workaround can be removed.
Where to find what¶
I want to… |
Go to |
|---|---|
Transform coordinates between two CRSs |
|
Find out which operations exist between two CRSs |
|
Find a CRS for an area and datum, or list what the database holds |
|
List the transformations an authority publishes, deprecated ones included |
|
See which grid files are installed, and which operations need them |
|
Understand why my transformation was refused |
|
Turn an azimuth between true and grid north, or scale a distance onto the grid |
|
Transform or round a geometry in WKT, WKB, EWKB, GeoJSON or Esri JSON |
|
Convert a GeoJSON, JSON-FG or OSDU AnyCrs GeoJSON document |
|
Position a well from its directional survey |
|
Square up a seismic bin grid, or convert it to another CRS |
|
Read or write an OSDU |
|
Understand what a |
Persistable references (OSDU), Persistable references from a catalogue |
Add my organisation’s CRSs and transformations to PROJ |
|
Use my organisation’s CRSs without Georepository credentials |
|
Know what the package does differently from plain pyproj |
|
Look up a term such as bound CRS or ballpark |