Closed musicformellons closed 2 years ago
geozero is principally concerned with reading and writing different formats of geospatial data, but it doesn't really have any facilities for transforming the data.
Or would I need to use it in combination with https://github.com/georust/proj
That should work! The specifics will depend on what your input and output are exactly.
proj crate knows how to work with geo-types geometries, so my approach would probably be something like:
There's now a Transform
trait in the proj
crate (and also reexported in the geo
crate) that you can use that will make this a little simpler https://docs.rs/proj/latest/proj/trait.Transform.html
I don't think there's anything left to do here, so closing.
@musicformellons - I actually ended up trying to do something like what you mentioned and had a hard time. 😅
I was able to go from geojson -> geo_types -> proj -> geojson easy enough.
But the complication I encountered was that I didn't see a non-terrible way to maintain the geojson's properties (since they are lost at the "-> geo_types" step.
Did you end up getting something like this to work?
@michaelkirk I think in the end I might not needed it. I see only 'proj' and 'geo-types' in my cargo.toml
. I was working with shapefiles. So can't help I'm afraid.
As I do encounter mentions of SRID in the issues and docs I am a bit puzzled if this library can also convert from one projection to another? Or would I need to use it in combination with https://github.com/georust/proj and if so, is there an example maybe how to do that?