-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SEDONA-498] Add ST_BestSRID #1246
Conversation
@prantogg Please add Snowflake doc |
docs/api/flink/Function.md
Outdated
- In cases where none of the above conditions are met, or for geometries that cross the International Date Line, the function defaults to the Mercator projection. | ||
|
||
!!!Warning | ||
`ST_BestSRID` is designed to estimate a suitable SRID from a set of approximately 125 EPSG codes and works best for geometries that fit within the UTM zones. It should not be solely relied upon to determine the most accurate SRID, especially for specialized or high-precision spatial requirements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this wouldn't render correctly as it is missing a tab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Good catch. Indentations don't seem to transfer when copy pasting. Thanks!
- In cases where none of the above conditions are met, or for geometries that cross the International Date Line, the function defaults to the Mercator projection. | ||
|
||
!!!Warning | ||
`ST_BestSRID` is designed to estimate a suitable SRID from a set of approximately 125 EPSG codes and works best for geometries that fit within the UTM zones. It should not be solely relied upon to determine the most accurate SRID, especially for specialized or high-precision spatial requirements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here, tab missing.
docs/api/sql/Function.md
Outdated
- For geometries that fit within a single UTM zone and do not cross the International Date Line, a corresponding UTM SRID is chosen. | ||
- In cases where none of the above conditions are met, or for geometries that cross the International Date Line, the function defaults to the Mercator projection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not found how the data line was handled in the implementation. Would you please point out where the date line was handled in bestSRID
function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not handle geometries crossing the IDL appropriately. By the below line I mean - geometries crossing the IDL are mishandled and cause the determined SRID to default to Mercator projection SRID.
The mishandling happens with the angularWidth
and angularHeight
calculation; this causes the xwidth
to be much larger that 6 degrees, which defaults the SRID to mercator.
In cases where none of the above conditions are met, or for geometries that cross the International Date Line, the function defaults to the Mercator projection.
This line is a bit confusing, let me clarify this in the doc
Snowflake functions of this PR are being tested in a separate PR: wherobots#11 |
docs/api/flink/Function.md
Outdated
|
||
Since: `v1.6.0` | ||
|
||
Spark SQL Example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please call it
SQL Example
in all flink, spark, snowflake docs. - Please say that this ST_BestSRID functions takes a WGS84 geometry as input and the geometry should follow lon/lat order.
Did you read the Contributor Guide?
Is this PR related to a JIRA ticket?
[SEDONA-XXX] my subject
.What changes were proposed in this PR?
This PR introduces
ST_BestSRID
, which estimates the most appropriate SRID for a given geometry, based on its spatial extent and location.How was this patch tested?
Did this PR include necessary documentation updates?
vX.Y.Z
format.