You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Equidistant cylindrical on an ellipsoid: RustGIS now differs from PROJ/GDAL (since #1463) #1586
#1463 made RustGIS compute an equidistant cylindrical projection on an ellipsoid with EPSG method 1028's ellipsoidal formulas (rustgis_geom::EquidistantCylindrical). PROJ, and so GDAL and QGIS, compute +proj=eqc on a sphere of the semi-major axis even when the definition gives an ellipsoid:
>>> pyproj.proj_version_str
'9.7.1'
>>> pyproj.Transformer.from_crs('EPSG:4326', 'EPSG:4087', always_xy=True).transform(0, 45)
(0.0, 5009377.085697311) # a * pi/4: spherical
>>> pyproj.Proj('+proj=eqc +a=3396190 +rf=169.894447223612')(-133.8, 18.65)
(-7930954.53, 1105473.11) # the same as +R=3396190
So a file GDAL wrote in EPSG:4087, or in an IAU planetographic Equirectangular system (Mars 2015 Ographic, flattening 1/169.9), now opens in RustGIS at a different latitude from where its producer put it: about 0.2° on Mars at 18°N, about 0.2° (24 km) at 45°N on the Earth. Before #1463 RustGIS agreed with PROJ.
Which is right is a design decision: EPSG's definition (what #1463 implements) or what the files in the wild were computed with (PROJ's). Options:
keep EPSG 1028's ellipsoidal formulas (current main), and say so where it may differ from the producer;
follow PROJ, as every other projection RustGIS reads does;
ellipsoidal only for WKT2 that names EPSG method 1028, spherical for Esri Equidistant_Cylindrical/Equirectangular and GeoTIFF CT 17.
Found while fixing main's CI: the planetary tests from #1478 computed their fixtures spherically and failed after #1463 merged; the CI fix (adjusting those fixtures to main's behaviour) leaves this question open.
Activity
Projection: preserve legacy PROJ/GDAL equidistant cylindrical files (o…