Skip to content
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-676] Add ST_Perimeter #1686

Merged
merged 9 commits into from
Nov 21, 2024
Merged

Conversation

furqaankhan
Copy link
Contributor

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

What changes were proposed in this PR?

  • Add ST_Perimeter

How was this patch tested?

  • Add unit tests

Did this PR include necessary documentation updates?

  • Yes, I have updated the documentation.

public static double perimeter(Geometry geometry, boolean use_spheroid, boolean lenient) {
if (use_spheroid && geometry.getSRID() != 4326) {
if (lenient) {
return 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to assume SRID is 4326 if lenient is true. This is particularly useful because most people forget to set SRID for their 4326 geometries.

@jiayuasu
Copy link
Member

@furqaankhan please fix the snowflake failure

@furqaankhan
Copy link
Contributor Author

@jiayuasu Snowflake test passed

@jiayuasu jiayuasu merged commit 34c4ad1 into apache:master Nov 21, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants