sedona
sedona copied to clipboard
[SEDONA-39] Fix lon/lat order in ST_Transform to be consistent with PostGIS
Did you read the Contributor Guide?
- Yes, I have read Contributor Rules and Contributor Development Guide
Is this PR related to a JIRA ticket?
- Yes, the URL of the assoicated JIRA ticket is https://issues.apache.org/jira/browse/SEDONA-39. The PR name follows the format
[SEDONA-39] my subject.
What changes were proposed in this PR?
How was this patch tested?
Did this PR include necessary documentation updates?
- Yes, I am adding a new API. I am using the current SNAPSHOT version number in since
vX.Y.Zformat.
@netanel246 @Imbruced @yitao-li
Since Sedona 1.0.0, ST_Transform uses lat/lon order, instead of lon/lat order in GeoSpark. So now Sedona behavior is different from what PostGIS does.
Currently, who uses lon/lat order can (1) use ST_FlipCoordinates twice, before and after ST_Transform. or (2)System.setProperty("org.geotools.referencing.forceXY", "true");
Do you think it is good to change back to lon/lat in this PR?
I think we should be aligned with PostGIS. However, we must be clear about staying with lat/lon order and emphasize that users need to update their code if they use this version.
I agree with @netanel246 we should be consistent with what Postgis does. And definitely we need communicate that clearly with users.
@netanel246 @Imbruced Got it. I will then continue working on this PR.