Finding CRSs

crs() lists the coordinate reference systems the active database holds. Without filters, that is every CRS of every authority:

from geodetic_engine import catalog

everything = catalog.crs()
print(len(everything), "CRSs, for example", everything[0])
13459 CRSs, for example Anguilla 1957 / British West Indies Grid (EPSG:2000)

By area and datum

The question this page answers most often: which projected CRSs on ETRS89 cover my area? area_of_interest is (west, south, east, north) in degrees, and an area of use intersects it exactly when PROJ’s own CRS search says so:

found = catalog.crs(
    authority="EPSG",
    kind="projected",
    datum="ETRS89",
    area_of_interest=(4.5, 58.0, 8.0, 62.0),  # western Norway
)
found.to_dataframe()[["authority_code", "name", "projection_method", "area_of_use"]]
authority_code name projection_method area_of_use
0 EPSG:3034 ETRS89-extended / LCC Europe Lambert Conic Conformal (2SP) Europe - European Union (EU) countries and can...
1 EPSG:3035 ETRS89-extended / LAEA Europe Lambert Azimuthal Equal Area Europe - European Union (EU) countries and can...
2 EPSG:3043 ETRS89 / UTM zone 31N (N-E) Transverse Mercator Europe between 0°E and 6°E and approximately 3...
3 EPSG:3044 ETRS89 / UTM zone 32N (N-E) Transverse Mercator Europe between 6°E and 12°E and approximately ...
4 EPSG:25831 ETRS89 / UTM zone 31N Transverse Mercator Europe between 0°E and 6°E: Andorra; Denmark -...
5 EPSG:25832 ETRS89 / UTM zone 32N Transverse Mercator Europe between 6°E and 12°E: Austria; Denmark ...

contains=True keeps only the CRSs whose area of use contains the whole area of interest, rather than merely touching it:

whole = catalog.crs(
    authority="EPSG", kind="projected", datum="ETRS89",
    area_of_interest=(4.5, 58.0, 8.0, 62.0), contains=True,
)
[entry.authority_code for entry in whole]
['EPSG:3034', 'EPSG:3035']

datum takes a code, a name, an alias or an entry. ETRS89 is a datum ensemble; the filter matches the datum exactly, so it does not match a CRS on one of its member frames:

on_etrf2000 = catalog.crs(authority="EPSG", datum="ETRF2000", kind="geographic_2d")
[str(entry) for entry in on_etrf2000]
['ETRF2000 (EPSG:9067)']

By kind

Every entry has a CrsKind, and kind takes one or several, by member or by value:

from collections import Counter

Counter(entry.kind.value for entry in catalog.crs(authority="EPSG"))
Counter({'projected': 5417,
         'geographic_2d': 637,
         'compound': 573,
         'vertical': 308,
         'geographic_3d': 265,
         'geocentric': 252,
         'engineering': 16})
vertical_in_norway = catalog.crs(
    authority="EPSG", kind="vertical", area_name="Norway"
)
[str(entry) for entry in vertical_in_norway]
['EVRF2007 height (EPSG:5621)',
 'EVRF2000 height (EPSG:5730)',
 'NN54 height (EPSG:5776)',
 'NN2000:2018 height (EPSG:5941)',
 'EVRF2019 height (EPSG:9389)',
 'EVRF2019 mean-tide height (EPSG:9390)',
 'CD Norway depth (EPSG:9672)',
 'BSCD2000 depth (EPSG:10678)',
 'NN2000:2025 height (EPSG:11394)']

Every engineering CRS – the local CRSs of plants, sites and seismic surveys – of every authority:

engineering = catalog.crs(kind="engineering")
print(len(engineering), "engineering CRSs:", Counter(e.auth_name for e in engineering))
engineering.to_dataframe()[["authority_code", "name", "datums", "area_of_use"]]
16 engineering CRSs: Counter({'EPSG': 16})
authority_code name datums area_of_use
0 EPSG:5800 Astra Minas Grid (Astra Minas (EPSG:9300),) Argentina - Comodoro Rivadavia area.
1 EPSG:5801 Barcelona Grid B1 (Barcelona (EPSG:9301),) Venezuela - Puerto La Cruz area.
2 EPSG:5802 Barcelona Grid B2 (Barcelona (EPSG:9301),) Venezuela - Puerto La Cruz area.
3 EPSG:5803 Maturin Grid (Maturin (EPSG:9302),) Venezuela - Maturin area.
4 EPSG:5808 Maracaibo Cross Grid M4 (Maracaibo Cross (EPSG:9303),) Venezuela - Maracaibo area, onshore and offsho...
5 EPSG:5809 Maracaibo Cross Grid M5 (Maracaibo Cross (EPSG:9303),) Venezuela - Maracaibo area, onshore and offsho...
6 EPSG:5810 La Rosa Grid (La Rosa (EPSG:9304),) Venezuela - Cabimas area.
7 EPSG:5811 Mene Grande (Mene Grande (EPSG:9305),) Venezuela - south Maracaibo area.
8 EPSG:5812 El Cubo (El Cubo (EPSG:9306),) Venezuela - Pedregal area of Falcon state.
9 EPSG:5813 Dabajuro (Dabajuro (EPSG:9307),) Venezuela - Falcon state.
10 EPSG:5814 Tucupita (Tucupita (EPSG:9308),) Venezuela - Deltana area.
11 EPSG:5815 Santa Maria de Ipire (Santa Maria de Ipire (EPSG:9310),) Venezuela - Guarico state.
12 EPSG:5816 Barinas west base (Barinas west base (EPSG:9311),) Venezuela - Barinas area.
13 EPSG:5817 Tombak LNG plant (Tombak LNG plant (EPSG:9314),) Iran - Kangan district.
14 EPSG:6715 Christmas Island Grid 1985 (Christmas Island Datum 1985 (EPSG:1134),) Christmas Island - onshore.
15 EPSG:11378 Heathrow Airport Grid (Heathrow Airport Grid (EPSG:1452),) UK - Heathrow airport and surrounding area.

Note

pyproj reports an engineering CRS as a plain CRS, and its own engineering filter finds none. The kind here is read from proj.db, so kind="engineering" finds them; see Known issues and workarounds.

By authority

authority takes any authority authorities() lists, or several:

[str(authority) for authority in catalog.authorities()]
['EPSG v13.102',
 'ESRI ArcGIS Pro 3.6',
 'IAU_2015',
 'IGNF 3.1.0',
 'NKG 1.0.w',
 'NRCAN',
 'OGC',
 'OSDU',
 'PROJ 9.9.0']

The CRSs the OSDU catalogue defines itself are under the authority OSDU in the database the released package ships (see Custom database from OSDU). They are bound CRSs, each carrying the transformation the catalogue binds it to, and each lists the OSDU record ids that publish it:

osdu = catalog.crs(authority="OSDU")
print(len(osdu), "CRSs of authority OSDU:", Counter(e.kind.value for e in osdu))
print(sum(e.bound for e in osdu), "of them bound")
osdu.to_dataframe()[["authority_code", "name", "kind", "bound", "osdu_ids"]].head(10)
1274 CRSs of authority OSDU: Counter({'projected': 997, 'geographic_2d': 277})
1274 of them bound
authority_code name kind bound osdu_ids
0 OSDU:2003001 Grenada 1953 * DOS-Grd / British West Indies G... projected True (reference-data--CoordinateReferenceSystem:Bou...
1 OSDU:2039001 Israel 1993 * SoI-Isr / Israeli TM Grid [2039,... projected True (reference-data--CoordinateReferenceSystem:Bou...
2 OSDU:2041001 Abidjan 1987 * IGN-Civ / UTM zone 30N [2041,1470] projected True (reference-data--CoordinateReferenceSystem:Bou...
3 OSDU:2042001 Locodjo 1965 * IGN-Civ / UTM zone 29N [2042,1469] projected True (reference-data--CoordinateReferenceSystem:Bou...
4 OSDU:2043001 Abidjan 1987 * IGN-Civ / UTM zone 29N [2043,1470] projected True (reference-data--CoordinateReferenceSystem:Bou...
5 OSDU:2044001 Hanoi 1972 * BP-Vnm / Gauss-Kruger zone 18 [20... projected True (reference-data--CoordinateReferenceSystem:Bou...
6 OSDU:2045001 Hanoi 1972 * BP-Vnm / Gauss-Kruger zone 19 [20... projected True (reference-data--CoordinateReferenceSystem:Bou...
7 OSDU:2048001 Hartebeesthoek94 * EPSG-Zaf / Lo19 [2048,1505] projected True (reference-data--CoordinateReferenceSystem:Bou...
8 OSDU:2051001 Hartebeesthoek94 * EPSG-Zaf / Lo25 [2051,1505] projected True (reference-data--CoordinateReferenceSystem:Bou...
9 OSDU:2058001 ED50(ED77) * NCCI-Irn / UTM zone 38N [2058,1514] projected True (reference-data--CoordinateReferenceSystem:Bou...

The catalogue also publishes plain EPSG CRSs under record ids of their own, and those stay under the authority EPSG. So every CRS the OSDU catalogue publishes, whatever its authority, is every entry with osdu_ids:

published = [entry for entry in catalog.crs(deprecated=None) if entry.osdu_ids]
print(len(published), "CRSs have an OSDU record id:", Counter(e.auth_name for e in published))
catalog.crs(code="EPSG:23031").one().osdu_ids
2545 CRSs have an OSDU record id: Counter({'OSDU': 1274, 'EPSG': 1271})
('reference-data--CoordinateReferenceSystem:Projected:EPSG::23031',)

By unit, coordinate system and projection

unit matches a CRS with any axis in that unit, and coordinate_system_kind the kind of its coordinate system:

feet = catalog.crs(
    authority="EPSG", unit="US survey foot", projection_method="Lambert Conic"
)
print(len(feet), "CRSs in US survey feet on a Lambert Conic Conformal projection")
feet.to_dataframe()[["authority_code", "name", "axis_units"]].head()
394 CRSs in US survey feet on a Lambert Conic Conformal projection
authority_code name axis_units
0 EPSG:2204 NAD27 / Tennessee (US survey foot (EPSG:9003), US survey foot (E...
1 EPSG:2225 NAD83 / California zone 1 (ftUS) (US survey foot (EPSG:9003), US survey foot (E...
2 EPSG:2226 NAD83 / California zone 2 (ftUS) (US survey foot (EPSG:9003), US survey foot (E...
3 EPSG:2227 NAD83 / California zone 3 (ftUS) (US survey foot (EPSG:9003), US survey foot (E...
4 EPSG:2228 NAD83 / California zone 4 (ftUS) (US survey foot (EPSG:9003), US survey foot (E...
[str(e) for e in catalog.crs(authority="EPSG", coordinate_system_kind="spherical")]
[]

By name

name is a case-insensitive substring of the name or of any alias the database records, or a re.Pattern for anything more precise:

import re

zone_32 = catalog.crs(authority="EPSG", name=re.compile(r"/ UTM zone 32N$"))
[str(entry) for entry in zone_32]
['ELD79 / UTM zone 32N (EPSG:2077)',
 'Manoca 1962 / UTM zone 32N (EPSG:2215)',
 'ETRS89-ITA [IGM95] / UTM zone 32N (EPSG:3064)',
 'LGD2006 / UTM zone 32N (EPSG:3199)',
 'ETRS89 / UTM zone 32N (zE-N) (EPSG:4647)',
 'ETRS89 / UTM zone 32N (N-zE) (EPSG:5652)',
 'ETRS89-ITA [RDN2008] / UTM zone 32N (EPSG:7791)',
 'ETRS89-DEU [ETRS89/DREF91/2016] / UTM zone 32N (EPSG:10732)',
 'ETRS89-NOR [EUREF89] / UTM zone 32N (EPSG:11022)',
 'RGSH2020 / UTM zone 32N (EPSG:22232)',
 'Carthage / UTM zone 32N (EPSG:22332)',
 'ED50 / UTM zone 32N (EPSG:23032)',
 'ETRS89 / UTM zone 32N (EPSG:25832)',
 'Minna / UTM zone 32N (EPSG:26332)',
 "M'poraloko / UTM zone 32N (EPSG:26632)",
 'Nord Sahara 1959 / UTM zone 32N (EPSG:30732)',
 'WGS 72 / UTM zone 32N (EPSG:32232)',
 'WGS 72BE / UTM zone 32N (EPSG:32432)',
 'WGS 84 / UTM zone 32N (EPSG:32632)']

The aliases come from the database, so old and vendor names find the current CRS:

tm32 = catalog.crs(name="ETRS89-TM32").one()
print(tm32)
print(tm32.aliases)
ETRS89 / UTM zone 32N (N-E) (EPSG:3044)
('ETRS - TM32', 'NO_ETRS89 / UTM', 'DE_ETRS89 / UTM', 'ETRS89 / UTM zone 32', 'ETRS89 / TM32', 'ETRS89-TM32', 'ETRF89 / ETRS-TM32', 'ETRF89 / TM32', 'ETRF89 / UTM zone 32N (N-E)', 'ETRS_1989_ETRS-TM32')

Deprecated CRSs

Deprecated CRSs are left out, as PROJ leaves them out. deprecated=True lists only them, and deprecated=None lists both. A deprecated entry names what replaces it, where the authority states it:

for entry in catalog.crs(authority="EPSG", deprecated=True, name="UTM zone 32N"):
    print(entry, "->", entry.replaced_by)
Douala / UTM zone 32N (EPSG:22832) -> ('EPSG:2214',)

Reading an entry

A CrsEntry is read from the database without building the CRS:

entry = catalog.crs(code="EPSG:25832").one()
print("kind:            ", entry.kind)
print("datums:          ", [str(d) for d in entry.datums])
print("coordinate system:", entry.coordinate_system)
print("axis units:      ", [u.name for u in entry.axis_units])
print("area of use:     ", entry.area_of_use.bounds)
print("usages:          ", len(entry.areas_of_use))
kind:             projected
datums:           ['European Terrestrial Reference System 1989 ensemble (EPSG:6258)']
coordinate system: Cartesian 2D CS. Axes: easting, northing (E,N). Orientations: east,north. UoM: metre. (EPSG:4400)
axis units:       ['metre', 'metre']
area of use:      (6.0, 36.53, 12.01, 84.01)
usages:           2

A compound CRS reports both its datums, horizontal then vertical, and the units of all its axes:

compound = catalog.crs(code="EPSG:9518").one()
[str(d) for d in compound.datums], [u.name for u in compound.axis_units]
(['World Geodetic System 1984 ensemble (EPSG:6326)',
  'EGM2008 geoid (EPSG:1027)'],
 ['degree (supplier to define representation)',
  'degree (supplier to define representation)',
  'metre'])

Every reference is an ObjectRef, and every code filter takes one, so following a reference is one more listing:

catalog.datums(code=entry.datums).one()
DatumEntry(auth_name='EPSG', code='6258', name='European Terrestrial Reference System 1989 ensemble', deprecated=False, kind=<DatumKind.GEODETIC: 'geodetic'>, ellipsoid=ObjectRef(auth_name='EPSG', code='7019', name='GRS 1980'), frame_reference_epoch=None)

Using an entry

resolve() builds the CRS the way geodetic_engine.geodesy would, and the authority code goes anywhere a CRS does:

from geodetic_engine.geodesy import transform

crs = entry.resolve()
print(crs.axis_abbreviations, crs.axis_units)
transform("EPSG:4258", entry.authority_code, (10.7522, 59.9139)).coordinates
('E', 'N') ('metre', 'metre')
((597979.9028839065, 6643118.991370024),)

to_json_dict() is the CRS’s full PROJJSON, exactly as PROJ exports it:

definition = entry.to_json_dict()
definition["$schema"], definition["type"], definition["conversion"]["method"]
('https://proj.org/schemas/v0.7/projjson.schema.json',
 'ProjectedCRS',
 {'name': 'Transverse Mercator', 'id': {'authority': 'EPSG', 'code': 9807}})