Open asjohnston-asf opened 3 years ago
GDAL 3 requires PROJ 6, which updates the order for lat/lon coordinates in certain projections:
https://gdal.org/tutorials/osr_api_tut.html#crs-and-axis-order
Under gdal 3, lat/lon should be reversed for TransformPoint() at https://github.com/ASFHyP3/hyp3-lib/blob/develop/hyp3lib/asf_geometry.py#L486:
TransformPoint()
>>> from hyp3lib.asf_geometry import geometry_geo2proj >>> geometry_geo2proj(60.44066740331063, 58.097257795794754, -145.429408241755, -150.72504174034862) (6, 0.0, inf, inf, inf, inf)
>>> coordTrans.TransformPoint(-145.429408241755,58.097257795794754) (inf, inf, inf) >>> coordTrans.TransformPoint(58.097257795794754, -145.429408241755) (592579.4722058995, 6440615.582391564, 0.0)
So far for backwards compatibility. Classic. Nice catch.
GDAL 3 requires PROJ 6, which updates the order for lat/lon coordinates in certain projections:
https://gdal.org/tutorials/osr_api_tut.html#crs-and-axis-order
Under gdal 3, lat/lon should be reversed for
TransformPoint()
at https://github.com/ASFHyP3/hyp3-lib/blob/develop/hyp3lib/asf_geometry.py#L486: