Adding SRID option to Geojson parser #150
mauritskorse
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
Interesting, as far as i am aware geojson is not defined for any other srid and only supports standard 4326. The documentation is also quite confusing, it says 4326 is required for geojson but also says it can be a different one? https://postgis.net/docs/ST_AsGeoJSON.html Do you have any other resources or examples? |
Beta Was this translation helpful? Give feedback.
3 replies
-
I am getting a lot of data from the Dutch PDOK geodata webservices. All of that can be retrieved in geojson but is in 28992 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be great if parsing geojson data of a certain SRID could be done more easily. It currently can't be directly done using the geojson parser. The parser has SRID 4326 hardcoded. Therefore we need to use ST::transform as second step. But then the actual geometry object doesn't have the correct SRID set. Also, many methods within the package accept an srid parameter and therefore you might expect the geojson parser should also allow for an SRID to be set.
Current situation
I think the following is a more expected way it would work:
Preferably no need to pass the default SRID to which to transform to. A default SRID for the app could be set in the config.
For overriding the defaults we could pass an SRID argument to the GeojsonParser to which the json should be transformed to. Or possilby have this as argument on the parse() method.
Beta Was this translation helpful? Give feedback.
All reactions