Examples

Every example here is executed on each documentation build against PROJ 9.9.0, so the output shown is what the code produces. The notebooks are the files in the repository’s examples/ directory.

Notebooks

Quickstart

A tour of geodetic_engine.geodesy: a projection, a named datum shift, a geoid height, a dynamic frame with a coordinate epoch, axis inspection, batch and numpy input, provenance, reuse, and bound CRSs including a collapsed chain and an OSDU payload.

geodetic-engine – Quickstart Examples
Worked examples

Longer cases: ED50 to WGS 84, OSDU bound CRS round trips through UTM, chained operations, Norwegian NN54 heights with and without a datum change, an engineering CRS, operation discovery by area of use, coordinate export, ten OSDU persistableReference scenarios, projection factors, and CRSs and operations named by OSDU record id, resolved against a small OSDU database the notebook builds first.

geodetic-engine examples
Catalog

Discovery with geodetic_engine.catalog: projected CRSs on a datum for an area, the transformations EPSG publishes between two datums and picking one for a point, registered versus assembled operations, deprecated operations, datum ensembles, following references from a CRS to its ellipsoid, units, methods, northing-first coordinate systems, missing grids, and JSON export.

geodetic-engine – Catalog examples
Well trajectories

Read the synthetic survey file, compute the trajectory, add points between the stations, convert to WGS 84 and plot it in 3D. Then one short example of each other way to build the input: arrays, rows, a DataFrame and an OSDU request body. Last, a real well, Volve F-1, checked against its survey report.

Well trajectory examples

Examples by topic

The user guide pages are executed too. Each is a set of short, self-contained examples:

Topic

Page

Shows

CRSs

Coordinate reference systems

Resolving inputs, declared vs value axis order, units, dimension, dynamic frames

Conversions

Conversions and transformations

Projection, inverse projection, zone change, geocentric, unit change

Datum transformations

Conversions and transformations

Named Helmert, concatenated operations, NADCON grids, geoid heights, compound CRSs, epoch-dependent Helmert, engineering CRS, bound CRS

Choosing operations

Choosing an operation

Listing, filtering, selecting by area of use, unnamed chains, ballpark candidates

Input and output

Input and output formats

Tuples, lists, numpy, per-axis, pandas, carried heights, exports, round trips

Provenance

Results and provenance

Applied operation, route, pipeline replay in plain pyproj, database fingerprints, JSON

Refusals

Errors and refusals

Triggering every GeodesyError subclass, including a simulated missing grid

Helmert algebra

Helmert utilities

Reading, composing and collapsing Helmerts; restating ppb scales

Finding CRSs

Finding CRSs

By area, datum, kind, unit, projection and name; deprecated CRSs; reading and using an entry

Finding operations

Finding operations

Transformations between two CRSs, accuracy, registered versus assembled, methods, grids, deprecated and superseded

Datums and building blocks

Datums, ellipsoids and prime meridians, Units, methods and coordinate systems

Ensembles and members, dynamic frames, ellipsoids, prime meridians, units, methods, coordinate systems

Grid files

Grid files

One entry per file, installed or missing, kinds

Catalog output

Listings and their output

Lazy listings, DataFrames, PROJJSON, the listing schema, provenance

Projection factors

Projection factors

Grid convergence and scale factor at one point and many, turning azimuths, scaling distances, figures across a UTM zone, a non-conformal projection

OSDU payloads

Reading, transforming and writing payloads

All six payload kinds, transforming with payloads, stated operations, units, writing payloads, method support tables

Building the input

Building the input

A trajectory input from arrays, rows, a DataFrame, a survey file and an OSDU request body; the survey file format; checks; changing and saving an input

Surveys

Surveys and units

Stations, units in every accepted form, inclination-only surveys, the wellhead, malformed surveys

Trajectories

Computing a trajectory

Results and their units, dogleg severity, interpolation, grid azimuths, a geographic CRS, moving to WGS 84

Minimum curvature

Minimum curvature

The method on its own, points on the arcs, resampling that reproduces the survey

Georeferencing methods

Georeferencing methods

The four methods side by side, and their geometric differences at depth

Plotting

Plotting

One well, several wells, colouring and shadows

Seismic bin grids

Seismic bin grids

P6 conversion both ways, four-corner squaring with a datum change, matching a dataset to a stored grid