Units, methods and coordinate systems

The building blocks every definition refers to. Each listing works like the others; see Filters.

Units of measure

units() lists the units PROJ knows, through pyproj.database.get_units_map(), with the factor to the SI unit of the same quantity:

from geodetic_engine import catalog

catalog.units(authority="EPSG", kind="linear", name="foot").to_dataframe()[
    ["authority_code", "name", "conversion_factor", "proj_short_name"]
]
authority_code name conversion_factor proj_short_name
0 EPSG:9002 foot 0.3048 ft
1 EPSG:9003 US survey foot 0.304801 us-ft
2 EPSG:9005 Clarke's foot 0.304797 NaN
3 EPSG:9041 British foot (Sears 1922) 0.304799 NaN
4 EPSG:9051 British foot (Benoit 1895 A) 0.3048 NaN
5 EPSG:9061 British foot (Benoit 1895 B) 0.3048 NaN
6 EPSG:9070 British foot (1865) 0.304801 NaN
7 EPSG:9080 Indian foot 0.3048 NaN
8 EPSG:9081 Indian foot (1937) 0.304798 ind-ft
9 EPSG:9082 Indian foot (1962) 0.3048 NaN
10 EPSG:9083 Indian foot (1975) 0.3048 NaN
11 EPSG:9094 Gold Coast foot 0.3048 NaN
12 EPSG:9095 British foot (1936) 0.304801 NaN
13 EPSG:9300 British foot (Sears 1922 truncated) 0.304799 NaN

conversion_factor filters on the factor, exactly or as a range. A sexagesimal unit has no factor, and never matches:

[str(u) for u in catalog.units(kind="angular") if u.conversion_factor is None]
[]

A unit’s to_json_dict() is PROJJSON’s unit object, the form PROJ writes inside every definition that uses it:

catalog.units(code="EPSG:9003").one().to_json_dict()
{'type': 'LinearUnit',
 'name': 'US survey foot',
 'conversion_factor': 0.304800609601219,
 'id': {'authority': 'EPSG', 'code': 9003}}

Tip

To read a length or angle unit from a symbol, an OSDU unit id or an OSDU unit persistableReference, use geodetic_engine.units. This listing shows what PROJ knows.

Operation methods

methods() lists the methods the database lists and those its operations apply, with the parameters PROJ states for an operation that applies each, and how many operations do:

tm = catalog.methods(code="EPSG:9807").one()
print(tm, tm.kind, tm.operation_count, "operations")
[str(p) for p in tm.parameters]
Transverse Mercator (EPSG:9807) conversion 2568 operations
['Latitude of natural origin (EPSG:8801)',
 'Longitude of natural origin (EPSG:8802)',
 'Scale factor at natural origin (EPSG:8805)',
 'False easting (EPSG:8806)',
 'False northing (EPSG:8807)']

parameter finds the methods taking a parameter:

[str(m) for m in catalog.methods(parameter="Scale difference", authority="EPSG")]
['Coordinate Frame rotation (geocentric domain) (EPSG:1032)',
 'Position Vector transformation (geocentric domain) (EPSG:1033)',
 'Molodensky-Badekas (CF geocentric domain) (EPSG:1034)',
 'Geocentric translations (geog3D domain) (EPSG:1037)',
 'Time-dependent Position Vector tfm (geocentric) (EPSG:1053)',
 'Time-dependent Position Vector tfm (geog2D) (EPSG:1054)',
 'Time-dependent Coordinate Frame rotation (geocen) (EPSG:1056)',
 'Time-dependent Coordinate Frame rotation (geog2D) (EPSG:1057)',
 'Molodensky-Badekas (PV geocentric domain) (EPSG:1061)',
 'Molodensky-Badekas (PV geog2D domain) (EPSG:1063)',
 'Time-specific Position Vector transform (geocen) (EPSG:1065)',
 'Time-specific Coordinate Frame rotation (geocen) (EPSG:1066)',
 'Coordinate Frame rotation full matrix (geog2D) (EPSG:1133)',
 'Coordinate Frame rotation full matrix (geog3D) (EPSG:1140)',
 'Position Vector (geocen) & Geocen translations NEU velocities (gtg) (EPSG:1143)',
 'Coordinate Frame rotation (geog3D to compound) (EPSG:1149)',
 'Position Vector transformation (geog2D domain) (EPSG:9606)',
 'Coordinate Frame rotation (geog2D domain) (EPSG:9607)',
 'Molodensky-Badekas (CF geog2D domain) (EPSG:9636)']

The operations applying a method are one listing away:

ntv2 = catalog.methods(code="EPSG:9615").one()
len(catalog.operations(method=ntv2)), "current NTv2 operations"
(217, 'current NTv2 operations')

name matches a substring, so name="NTv2" also finds the velocity-grid methods named after the format; a pattern pins it down:

import re

[str(m) for m in catalog.methods(name="NTv2")], catalog.methods(name=re.compile("^NTv2$")).one()
(['Point motion by grid (NTv2_Vel) (EPSG:1070)',
  'Vertical Offset using NEU velocity grid (NTv2_Vel) (EPSG:1113)',
  'Geographic3D Offset using NEU velocity grid (NTv2_Vel) (EPSG:1114)',
  'Point motion (geog3D domain) using NEU velocity grid (NTv2_Vel) (EPSG:1141)',
  'NTv2 (EPSG:9615)'],
 MethodEntry(auth_name='EPSG', code='9615', name='NTv2', deprecated=False, kind=<MethodKind.TRANSFORMATION: 'transformation'>, operation_count=248))

Coordinate systems

coordinate_systems() lists the coordinate systems with their axes. proj.db keeps no name for a coordinate system, so the name is composed in the pattern EPSG uses:

cs = catalog.coordinate_systems(code="EPSG:4400").one()
print(cs.name)
[(axis.name, axis.abbreviation, axis.direction, axis.unit.name) for axis in cs.axes]
Cartesian 2D CS. Axes: easting, northing (E,N). Orientations: east,north. UoM: metre.
[('Easting', 'E', 'east', 'metre'), ('Northing', 'N', 'north', 'metre')]

axes finds coordinate systems by their axis abbreviations, in order. This finds the northing-first Cartesian systems, the ones whose CRSs are easiest to get wrong:

[str(c) for c in catalog.coordinate_systems(authority="EPSG", axes=("N", "E"))]
['Cartesian 2D CS. Axes: northing, easting (N,E). Orientations: north,east. UoM: foot. (EPSG:1029)',
 'Cartesian 2D CS. Axes: northing, easting (N,E). Orientations: North along 180°E,North along 90°W. UoM: metre. (EPSG:1044)',
 'Cartesian 2D CS. Axes: local northing, local easting (n,e). Orientations: north,east. UoM: metre. (EPSG:1047)',
 'Cartesian 2D CS. Axes: local northing, local easting (n,e). Orientations: north,east. UoM: foot. (EPSG:1048)',
 'Cartesian 2D CS. Axes: northing, easting (N,E). Orientations: north,east. UoM: US survey foot. (EPSG:1053)',
 'Cartesian 2D CS. Axes: northing, easting (N,E). Orientations: South along 180°E,South along 90°E. UoM: metre. (EPSG:4493)',
 'Cartesian 2D CS. Axes: northing, easting (N,E). Orientations: North along 0°E,North along 90°E. UoM: metre. (EPSG:4494)',
 'Cartesian 2D CS. Axes: northing, easting (N,E). Orientations: north,east. UoM: metre. (EPSG:4500)',
 'Cartesian 2D CS. Axes: northing, westing (N,E). Orientations: north,west. UoM: metre. (EPSG:4501)',
 "Cartesian 2D CS. Axes: northing, easting (N,E). Orientations: north,east. UoM: Clarke's foot. (EPSG:4502)",
 'Cartesian 2D CS. Axes: plant north, plant east (n,e). Orientations: northWest,northEast. UoM: metre. (EPSG:6504)',
 'Cartesian 2D CS. Axes: first local axis, second local axis (n,e). Orientations: northWest,northEast. UoM: metre. (EPSG:6505)']

An axis pointing along a meridian, as on a polar stereographic projection, states that meridian:

polar = catalog.coordinate_systems(code="EPSG:1026").one()
[(axis.abbreviation, axis.direction, axis.meridian) for axis in polar.axes]
[('E', 'south', 90.0), ('N', 'south', 180.0)]

to_json_dict() is PROJ’s export of the coordinate system from a CRS that uses it, and, for one no CRS uses, assembled from the database in the same form:

cs.to_json_dict()
{'$schema': 'https://proj.org/schemas/v0.7/projjson.schema.json',
 'type': 'CoordinateSystem',
 'subtype': 'Cartesian',
 'axis': [{'name': 'Easting',
   'abbreviation': 'E',
   'direction': 'east',
   'unit': 'metre'},
  {'name': 'Northing',
   'abbreviation': 'N',
   'direction': 'north',
   'unit': 'metre'}],
 'id': {'authority': 'EPSG', 'code': 4400}}