I was running a test of all available projections in PROJ 9.6.2 using
GDAL 3.11.3 (both current as of this writing), on Windows.
I got errors trying to project from lat/lon and back with the 55
projections listed in the attached CSV file. If I leave off the
SetAxisMappingStrategy calls, many more projections fail.
No deprecated or celestial body projections were tested.
When a transformation failed to go from lat/lon to the projected CRS,
the reason was usually that the transformation wound up with an infinity.
My test program is essentially this:
LatLonCRS = OGRSpatialReference(EPSG:4326)
LatLonCRS.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER)
Projections = proj_get_crs_info_list_from_database()
For each Projection
Wkt2 = proj_as_wkt(Projection, PJ_WKT2_2019)
ProjCRS = OGRSpatialReference(Wkt2)
ProjCRS.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER)
Xfm1 = OGRCreateCoordTransform(LatLonCRS, ProjCRS)
Xfm2 = OGRCreateCoordTransform(ProjCRS, LatLonCRS)
ProjCRS.GetAreaOfUse(West, South, East, North)
// Get center of bbox
X = (West + East) / 2
Y = (North + South) / 2
Xfm1.Transform(X, Y) // Go from lat/lon to Proj CRS
Xfm2.Transform(X, Y) // and back to lat/lon
Next projection
There were various errors logged by PROJ:
Cannot find coordinate operations from `EPSG:2299' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:2301' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:2303' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:2304' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:2305' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:2306' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:2307' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:2963' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:3144' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5017' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5800' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5801' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5802' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5803' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5808' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5809' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5810' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5811' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5812' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5813' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5814' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5815' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5816' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:5817' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:6715' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:10642' to `EPSG:4326'
Cannot find coordinate operations from `EPSG:10740' to `EPSG:4326'
No inverse operation
Point outside of projection domain
PROJ: proj_crs_get_geodetic_crs: CRS has no geodetic CRS
PROJ: omerc: Invalid value for lat_1: lat_1 should be different from 0
PROJ: pipeline: Pipeline: Bad step definition: inv (Invalid value for an
argument)
PROJ: pipeline: Pipeline: Bad step definition: proj=omerc (Invalid value
for an argument)
PROJ: pipeline: Pipeline: Inverse operation for wag7 is not available
Are any of these bugs in PROJ or GDAL?
If so, are there any workarounds?
I was also wondering, should it be necessary to take a projection's axis
mapping into account? Isn't that a detail that GDAL or PROJ can abstract
away? Is SetAxisMappingStrategy() really needed?
My thanks in advance for any help,
Ray Gardener
Coordinate transformation errors using GDAL 3.11.3 and PROJ 9.6.2.,,
Compiled by Ray Gardener (r...@daylongraphics.com),,
Not including deprecated and celestial body projections,,
,,
Projection,Details,Error
,,
EPSG:2218,Scoresbysund 1952 / Greenland zone 5 east,COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:2221,Scoresbysund 1952 / Greenland zone 6 east,COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:2296,Ammassalik 1958 / Greenland zone 7 east,COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:2299,Qornoq 1927 / Greenland zone 2 west,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:2301,Qornoq 1927 / Greenland zone 3 west,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:2303,Qornoq 1927 / Greenland zone 4 west,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:2304,Qornoq 1927 / Greenland zone 5 west,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:2305,Qornoq 1927 / Greenland zone 6 west,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:2306,Qornoq 1927 / Greenland zone 7 west,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:2307,Qornoq 1927 / Greenland zone 8 east,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:2963,Lisbon 1890 (Lisbon) / Portugal Bonne,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:2985,Petrels 1972 / Terre Adelie Polar Stereographic,COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:2986,Perroud 1950 / Terre Adelie Polar Stereographic,COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:3052,Reykjavik 1900 / Lambert 1900,COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:3053,Hjorsey 1955 / Lambert 1955,COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:3139,Vanua Levu 1915 / Vanua Levu Grid,COULDN'T TRANSFORM FROM CRS TO LAT/LON
EPSG:3144,FD54 / Faroe Lambert,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:3145,ETRS89 / Faroe Lambert,COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:3173,fk89 / Faroe Lambert FK89,COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:5017,Lisbon 1890 / Portugal Bonne New,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5800,Astra Minas Grid,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5801,Barcelona Grid B1,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5802,Barcelona Grid B2,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5803,Maturin Grid,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5808,Maracaibo Cross Grid M4,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5809,Maracaibo Cross Grid M5,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5810,La Rosa Grid,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5811,Mene Grande,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5812,El Cubo,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5813,Dabajuro,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5814,Tucupita,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5815,Santa Maria de Ipire,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5816,Barinas west base,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:5817,Tombak LNG plant,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:6715,Christmas Island Grid 1985,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:10642,Saba height,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:10740,Sint Eustatius height,COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
EPSG:22300,Carthage (Paris) / Tunisia Mining Grid,COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:22700,Deir ez Zor / Levant Zone,COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:32600,WGS 84 / UTM grid system (northern hemisphere),COULDN'T TRANSFORM FROM LAT/LON TO CRS
EPSG:32700,WGS 84 / UTM grid system (southern hemisphere),COULDN'T TRANSFORM FROM LAT/LON TO CRS
ESRI:53025,Sphere_Hotine latlon coord: 0.000000,COULDN'T TRANSFORM FROM LAT/LON TO CRS
ESRI:53044,Sphere_Hammer_Aitoff,COULDN'T TRANSFORM FROM LAT/LON TO CRS
ESRI:53076,Sphere_Wagner_VII,COULDN'T TRANSFORM FROM CRS TO LAT/LON
ESRI:54025,World_Hotine,COULDN'T TRANSFORM FROM LAT/LON TO CRS
ESRI:54044,World_Hammer_Aitoff,COULDN'T TRANSFORM FROM LAT/LON TO CRS
ESRI:54050,World_Fuller,COULDN'T TRANSFORM FROM LAT/LON TO CRS
ESRI:54051,World_Cube ,COULDN'T TRANSFORM FROM LAT/LON TO CRS
ESRI:54076,World_Wagner_VII,COULDN'T TRANSFORM FROM CRS TO LAT/LON
ESRI:54091,WGS_1984_Peirce_quincuncial_North_Pole_diamond,COULDN'T TRANSFORM FROM CRS TO LAT/LON
ESRI:54100,WGS_1984_Tobler_Cylindrical_I,COULDN'T TRANSFORM FROM LAT/LON TO CRS
ESRI:54101,WGS_1984_Tobler_Cylindrical_II,COULDN'T TRANSFORM FROM LAT/LON TO CRS
ESRI:102299,Berghaus_Star_AAG,COULDN'T TRANSFORM FROM LAT/LON TO CRS
IGNF:RGWF96UTM1S.FUTUNA1997,RESEAU GEODESIQUE DE WALLIS ET FUTUNA 1996 UTM SUD FUSEAU 1 et NGWF ILES HORN (FUTUNA ET ALOFI),COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
IGNF:RGWF96UTM1S.WALLIS96,RESEAU GEODESIQUE DE WALLIS ET FUTUNA 1996 UTM SUD FUSEAU 1 et NGWF WALLIS (MOP 1996),COULDN'T CREATE CRS-TO-LAT/LON TRANSFORMATION
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev