Datums, ellipsoids and prime meridians

Datums and datum ensembles

datums() lists geodetic, vertical and engineering datums, and datum ensembles:

from geodetic_engine import catalog

catalog.datums(authority="EPSG", area_name="Norway").to_dataframe()[
    ["authority_code", "name", "kind", "is_ensemble", "is_dynamic", "ellipsoid"]
]
authority_code name kind is_ensemble is_dynamic ellipsoid
0 EPSG:1096 Norway Normal Null 2000:2018 vertical False False NaN
1 EPSG:1274 European Vertical Reference Frame 2019 vertical False False NaN
2 EPSG:1287 European Vertical Reference Frame 2019 mean tide vertical False False NaN
3 EPSG:1301 Norwegian Chart Datum vertical False False NaN
4 EPSG:1390 Baltic Sea Chart Datum 2000 vertical False False NaN
5 EPSG:1403 Nordic Geodetic Commission ETRF14 geodetic False False GRS 1980 (EPSG:7019)
6 EPSG:1407 EUREF89 geodetic False False GRS 1980 (EPSG:7019)
7 EPSG:1454 Norway Normal Null 2000:2025 vertical False False NaN
8 EPSG:5129 European Vertical Reference Frame 2000 vertical False False NaN
9 EPSG:5174 Norway Normal Null 1954 vertical False False NaN
10 EPSG:5215 European Vertical Reference Frame 2007 vertical False False NaN
11 EPSG:6230 European Datum 1950 geodetic False False International 1924 (EPSG:7022)
12 EPSG:6258 European Terrestrial Reference System 1989 ens... geodetic True False GRS 1980 (EPSG:7019)
13 EPSG:6273 NGO 1948 geodetic False False Bessel Modified (EPSG:7005)
14 EPSG:6817 NGO 1948 (Oslo) geodetic False False Bessel Modified (EPSG:7005)

ensemble=True keeps the datum ensembles. Each names its members and states its accuracy:

etrs89 = catalog.datums(code="EPSG:6258").one()
print(etrs89.projjson_type, etrs89.ensemble_accuracy, "m")
print(len(etrs89.members), "members, the first", etrs89.members[0])
DatumEnsemble 0.1 m
60 members, the first European Terrestrial Reference Frame 1989 (EPSG:1178)

member_of turns that round, listing the members of an ensemble:

[str(d) for d in catalog.datums(member_of="WGS 84", deprecated=None)]
['World Geodetic System 1984 (G730) (EPSG:1152)',
 'World Geodetic System 1984 (G873) (EPSG:1153)',
 'World Geodetic System 1984 (G1150) (EPSG:1154)',
 'World Geodetic System 1984 (G1674) (EPSG:1155)',
 'World Geodetic System 1984 (G1762) (EPSG:1156)',
 'World Geodetic System 1984 (Transit) (EPSG:1166)',
 'World Geodetic System 1984 (G2139) (EPSG:1309)',
 'World Geodetic System 1984 (G2296) (EPSG:1383)']

It takes ensembles only. A single datum has no members, so naming one is an error rather than an empty listing.

A dynamic reference frame has a reference epoch; dynamic and frame_reference_epoch filter on it:

recent = catalog.datums(authority="EPSG", frame_reference_epoch=(2015, None))
[(str(d), d.frame_reference_epoch) for d in recent]
[('SIRGAS Continuously Operating Network SIR17P01 (EPSG:1242)', 2015.0),
 ('Australian Terrestrial Reference Frame 2014 (EPSG:1291)', 2020.0),
 ('Red Geodesica Para Mineria en Chile (EPSG:1304)', 2024.0),
 ('World Geodetic System 1984 (G2139) (EPSG:1309)', 2016.0),
 ('International Terrestrial Reference Frame 2020 (EPSG:1322)', 2015.0),
 ('IGS20 (EPSG:1333)', 2015.0),
 ('World Geodetic System 1984 (G2296) (EPSG:1383)', 2024.0)]

ellipsoid and prime_meridian find the datums using one:

[str(d) for d in catalog.datums(authority="EPSG", prime_meridian="Paris")]
['Nouvelle Triangulation Francaise (Paris) (EPSG:6807)',
 'Tananarive 1925 (Paris) (EPSG:6810)',
 'Voirol 1875 (Paris) (EPSG:6811)',
 'Carthage (Paris) (EPSG:6816)',
 'Voirol 1879 (Paris) (EPSG:6821)']

A datum’s PROJJSON is PROJ’s export, so an ensemble’s lists its members:

definition = etrs89.to_json_dict()
definition["type"], definition["accuracy"], definition["members"][:2]
('DatumEnsemble',
 '0.1',
 [{'name': 'European Terrestrial Reference Frame 1989',
   'id': {'authority': 'EPSG', 'code': 1178}},
  {'name': 'European Terrestrial Reference Frame 1990',
   'id': {'authority': 'EPSG', 'code': 1179}}])

Ellipsoids

ellipsoids() gives every ellipsoid in metres, whatever unit the database states it in, with both the semi-minor axis and the inverse flattening, whichever one is stated:

catalog.ellipsoids(authority="EPSG", semi_major_axis=(6378000, 6378400)).to_dataframe()[
    ["authority_code", "name", "semi_major_axis", "semi_minor_axis", "inverse_flattening"]
]
authority_code name semi_major_axis semi_minor_axis inverse_flattening
0 EPSG:1024 CGCS2000 6378137 6356752.31414 298.257222
1 EPSG:1025 GSK-2011 6378136.5 6356751.757956 298.256415
2 EPSG:7003 Australian National Spheroid 6378160 6356774.719195 298.25
3 EPSG:7007 Clarke 1858 6378293.645209 6356617.98768 294.260676
4 EPSG:7008 Clarke 1866 6378206.4 6356583.8 294.978698
5 EPSG:7010 Clarke 1880 (Benoit) 6378300.789 6356566.435 293.466316
6 EPSG:7011 Clarke 1880 (IGN) 6378249.2 6356515 293.466021
7 EPSG:7012 Clarke 1880 (RGS) 6378249.145 6356514.86955 293.465
8 EPSG:7013 Clarke 1880 (Arc) 6378249.145 6356514.966399 293.466308
9 EPSG:7014 Clarke 1880 (SGA 1922) 6378249.2 6356514.996942 293.46598
10 EPSG:7019 GRS 1980 6378137 6356752.31414 298.257222
11 EPSG:7020 Helmert 1906 6378200 6356818.169628 298.3
12 EPSG:7021 Indonesian National Spheroid 6378160 6356774.504086 298.247
13 EPSG:7022 International 1924 6378388 6356911.946128 297
14 EPSG:7024 Krassowsky 1940 6378245 6356863.018773 298.3
15 EPSG:7025 NWL 9D 6378145 6356759.769489 298.25
16 EPSG:7028 Struve 1860 6378298.3 6356657.14267 294.73
17 EPSG:7029 War Office 6378300 6356751.689189 296
18 EPSG:7030 WGS 84 6378137 6356752.314245 298.257224
19 EPSG:7031 GEM 10C 6378137 6356752.314245 298.257224
20 EPSG:7032 OSU86F 6378136.2 6356751.516927 298.257224
21 EPSG:7033 OSU91A 6378136.3 6356751.616592 298.257224
22 EPSG:7034 Clarke 1880 6378249.144808 6356514.966204 293.466308
23 EPSG:7036 GRS 1967 6378160 6356774.516091 298.247167
24 EPSG:7041 Average Terrestrial System 1977 6378135 6356750.304922 298.257
25 EPSG:7043 WGS 72 6378135 6356750.520016 298.26
26 EPSG:7049 IAG 1975 6378140 6356755.288158 298.257
27 EPSG:7050 GRS 1967 Modified 6378160 6356774.719195 298.25
28 EPSG:7053 Hough 1960 6378270 6356794.343434 297
29 EPSG:7054 PZ-90 6378136 6356751.361746 298.257839
30 EPSG:7055 Clarke 1880 (international foot) 6378306.3696 6356571.996 293.466308
31 EPSG:7058 Hughes 1980 6378273 6356889.449 298.279411

A sphere has no inverse flattening. IAU_2015 models other bodies; celestial_body keeps one:

[str(e) for e in catalog.ellipsoids(celestial_body="Mars")]
['Mars_1979_IAU_IAG (ESRI:107904)',
 'Mars_2000_IAU_IAG (ESRI:107905)',
 'Mars_2000_(Sphere) (ESRI:107971)',
 'Mars (2015) - Sphere (IAU_2015:49900)',
 'Mars (2015) (IAU_2015:49901)']

The datums on an ellipsoid are one listing away:

clarke = catalog.ellipsoids(authority="EPSG", name="Clarke 1880 (RGS)").one()
len(catalog.datums(ellipsoid=clarke)), "datums on", str(clarke)
(48, 'datums on', 'Clarke 1880 (RGS) (EPSG:7012)')

Prime meridians

prime_meridians() gives each longitude as stated, in its unit, and in decimal degrees. EPSG states several in sexagesimal degrees, which PROJ reads as decimal degrees, and Paris in grads:

catalog.prime_meridians(authority="EPSG").to_dataframe()[
    ["authority_code", "name", "longitude", "unit", "longitude_degrees"]
]
authority_code name longitude unit longitude_degrees
0 EPSG:1026 Copenhagen 12.57775 degree 12.57775
1 EPSG:8901 Greenwich 0 degree 0
2 EPSG:8902 Lisbon -9.131906 degree -9.131906
3 EPSG:8903 Paris 2.596921 grad 2.337229
4 EPSG:8904 Bogota -74.080917 degree -74.080917
5 EPSG:8905 Madrid -3.687375 degree -3.687375
6 EPSG:8906 Rome 12.452333 degree 12.452333
7 EPSG:8907 Bern 7.439583 degree 7.439583
8 EPSG:8908 Jakarta 106.807719 degree 106.807719
9 EPSG:8909 Ferro -17.666667 degree -17.666667
10 EPSG:8910 Brussels 4.367975 degree 4.367975
11 EPSG:8911 Stockholm 18.058278 degree 18.058278
12 EPSG:8912 Athens 23.716337 degree 23.716338
13 EPSG:8913 Oslo 10.722917 degree 10.722917
14 EPSG:8914 Paris RGS 2.337208 degree 2.337208