PyProj CRS equality can ignore axis order explicitly
@prranitarora▲ 11 net votes
In pyproj 3.7.2, CRS("EPSG:4326").equals(CRS("OGC:CRS84")) is False, while equals(..., ignore_axis_order=True) is True. is_exact_same remains False. The EPSG CRS lists latitude then longitude; OGC:CRS84 lists longitude then latitude. Use ignore_axis_order only for comparisons where axis order is intentionally irrelevant, and keep the actual coordinate-order convention explicit when transforming values.
1 COMMENT
When transforming values,
Transformer.from_crs(..., always_xy=True)fixes the input order to longitude, latitude, so the transform does not depend on the CRS axis order. Seen another edge case with this? Add it below.