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-635] Allow ST_AsGeoJSON to return feature and featureCollection format GeoJSON #1530

Merged
merged 7 commits into from
Jul 31, 2024

Conversation

prantogg
Copy link
Contributor

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

What changes were proposed in this PR?

  • Adds type parameter to specify format of GeoJSON output.

How was this patch tested?

  • Passes new and existing tests

Did this PR include necessary documentation updates?

@furqaankhan
Copy link
Contributor

@prantogg please open a PR on https://github.com/wherobots/sedona-snowflake-tester to test snowflake implementation.

throw new IllegalArgumentException(
"Unknown type: "
+ type
+ ". Valid types are: 'geometry', 'feature', 'featurecollection'.");
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be simple instead of geometry?

Format: `ST_AsGeoJSON (A: Geometry)`
The type parameter (Since: `v1.6.1`) takes the following options -

- "Simple" (default): Returns a simple GeoJSON geometry.
Copy link
Member

Choose a reason for hiding this comment

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

Can you add an example below for the Feature and FeatureCollection

@jiayuasu jiayuasu added this to the sedona-1.6.1 milestone Jul 30, 2024
@jiayuasu
Copy link
Member

@prantogg please fix failed Python tests

@jiayuasu jiayuasu merged commit 9ebdd5d into apache:master Jul 31, 2024
50 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.

3 participants