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 support for Coordinate Reference System #46

Open
thePanz opened this issue Feb 26, 2024 · 2 comments
Open

Add support for Coordinate Reference System #46

thePanz opened this issue Feb 26, 2024 · 2 comments

Comments

@thePanz
Copy link

thePanz commented Feb 26, 2024

In a previous version of the GeoJson format, a Coordinate Reference System https://datatracker.ietf.org/doc/html/rfc7946#section-4, was supported and defined in the format.

According to the documentation:

Note: the use of alternative coordinate reference systems was
specified in [GJ2008], but it has been removed from this version of
the specification because the use of different coordinate reference
systems -- especially in the manner specified in [GJ2008] -- has
proven to have interoperability issues.

Would you accept a PR introducing the parsing of the crs in the GeoJsonReader class?
This would help in the reading of such property, when GeoJson from a legacy format is provided, instead of requiring to parse the JSON contents twice (first with this library, and the second time to extract the CRS property and apply the SRID to all geometries in the GeoJson file).

Note: other libraries supports that: https://rdrr.io/cran/geojson/man/crs.html

WDYT?

@BenMorel
Copy link
Member

BenMorel commented Jul 6, 2024

@thePanz Thanks for bringing this to my attention! I'm a bit reluctant to add something that has been removed from the spec, and am wondering if this belongs to this library or to a third-party library.

Do you actually have a use case for this?

@thePanz
Copy link
Author

thePanz commented Jul 19, 2024

@BenMorel Do you actually have a use case for this?

Our application is receiving a GeoJSON file, and we need to identify if it still contains the "deprecated" property.
In this case what we do is to deserialize the JSON contents and parse that property (if available), and then use the Brick library to (again) deserialize the JSON contents and have the Geometry objects back.

What I would like is to avoid such double de-serialization happening, but as you suggested it would require to include handling a deprecated property from the GeoJson specification.

Not sure which is the best path here, WDYT?

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

No branches or pull requests

2 participants