OperationEntry

class geodetic_engine.catalog.OperationEntry[source]

Bases: LocatedEntry

A coordinate operation the active database holds.

Listed by operations(). Its authority_code is a valid operation= for transform().

This is the operation as the authority registered it, between the CRSs it was registered for. Between two other CRSs PROJ may apply it as one step of a chain; available_operations() lists what PROJ would assemble for a pair.

kind

What kind of operation it is.

method

The operation method; None for a concatenated operation, whose steps each have their own.

source_crs

The CRS it was registered from; None for a conversion, which is registered without one.

target_crs

The CRS it was registered to; None for a conversion.

accuracy

Stated accuracy in metres, or None when none is stated.

version

The authority’s version label, for example "EPSG-Nor N", which tells apart several operations between one pair.

grid_names

The grid files it reads, as the database names them; for a concatenated operation, those of every step.

optional_grid_names

Those of grid_names it can run without. A PROJ string marks such a grid with @: PROJ reads it where it is installed, and goes without it otherwise.

steps

The steps of a concatenated operation, in order; empty otherwise.

superseded_by

"AUTH:CODE" of the operations the authority has superseded this one with. A superseded operation is not deprecated, and PROJ still offers it.

osdu_ids

The ids of the OSDU catalogue records that publish this operation, when the database was built from an OSDU catalogue; empty otherwise.

has_persistable_reference

Whether that build also recorded the persistableReference one of those records publishes.

property projjson_type: str

"Transformation", "Conversion" and so on.

property grid_based: bool

Whether it reads any grid file.

property superseded: bool

Whether the authority has superseded it.

grids()[source]

The grid files PROJ reads for it, and whether each is available now.

Named as PROJ names them, one per file: EPSG’s conus.las and conus.los are PROJ’s one us_noaa_conus.tif. The optional grids, optional_grid_names, are among them. A file is available when PROJ finds it on this machine, as GridEntry.installed says, or, with PROJ’s networking enabled, when the database states a direct download under an open licence for it, as it does for the grids PROJ’s network serves.

PROJ’s own account of a registered operation is not used. It tests the names the authority published, so it calls a grid missing that PROJ reads under its own name.

Return type:

tuple[GridUsage, ...]

grids_available()[source]

Whether every grid it cannot run without is available.

True when it reads no grid, or only optional ones. See grids() for what available means.

Return type:

bool

to_json_dict()[source]

The operation’s full PROJJSON, exactly as PROJ exports it.

Return type:

dict[str, Any]

Example

>>> from geodetic_engine import catalog
>>> helmert = catalog.operations(code="EPSG:1612").one()
>>> helmert.to_json_dict()["method"]["name"]
'Position Vector transformation (geog2D domain)'
__init__(*, auth_name, code, name, deprecated, aliases=(), replaced_by=(), areas_of_use=(), kind, method=None, source_crs=None, target_crs=None, accuracy=None, version=None, grid_names=(), optional_grid_names=(), steps=(), superseded_by=(), osdu_ids=(), has_persistable_reference=False)