bjornharrtell / jts2geojson

JTS from/to GeoJSON converter for Java
MIT License
141 stars 57 forks source link

Provide method to allow user to specify the GeometryFactory #28

Closed fbl100 closed 6 years ago

fbl100 commented 6 years ago

Provide the user a mechanism to specify the GeometryFactory used in the GeoJSONReader. An example use case for this would be a geometry factory that creates Polygons that properly calculate their area on the surface of the earth.

fbl100 commented 6 years ago

FWIW I have a local branch with this working. Not sure if I need special permissions to push my branch for considerations.

woodsyb-zz commented 6 years ago

This would be awesome. Being able to set precision is pretty important.

patzi commented 6 years ago

Hi, I'd like to work on this as I need the possibility to set the GeometryFactory#SRID . Is see two possible ways to achieve this:

What would you prefer @bjornharrtell ? Second would be of course with lot less changes to current users. I could then provide a pull request. A similar approach could also be used for #22

bjornharrtell commented 6 years ago

Second option looks pragmatic to me. I found the initial description of this issue hard to understand which is the reason for the lack of response.

patzi commented 6 years ago

OK, then I will make a pull request for this with the second option.