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

Add toGeoJson() #149

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add toGeoJson() #149

wants to merge 2 commits into from

Conversation

limenet
Copy link

@limenet limenet commented Oct 1, 2020

First of all, thank you so much for this great package!

As suggested in #113 , it's not yet possible to generate normalized GeoJSON for a geometry. This PR adds this functionality including an updated README and tests. Properties in GeoJSON are also supported.

Contrary to Geometry::toJson(), the new Geometry::toGeoJson() returns a string instead of a JSON-able representation. I'm not sure if this is a good idea (because toGeoJson implies it should return JSON) or if it should behave like toJson() (for consistency). What do you think?

Let me know if you'd like me to make any changes!

Closes #113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate normalized GeoJSON
1 participant