Comments (5)
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
from geozero.
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:
- use geozero's geo-types reader, depending on your particular format (see the proj README for examples)
- use the to_geo method to get geo-types geometries
- use the proj crate to project the geo-types geometries to whatever SRS you want
- use geozero to write back to whatever supported format you'd like
from geozero.
I don't think there's anything left to do here, so closing.
from geozero.
@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?
from geozero.
@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.
from geozero.
Related Issues (20)
- [request] make WkbInfo and header readers public HOT 1
- Docs: Add example how to use with Serde HOT 1
- Implement an sqlx (sqlite) driver HOT 3
- Consider using pure rust protobuf codegen HOT 3
- Make readme examples part of `cargo test`
- Create a sample MVT file with all types of geometries/properties for testing
- Error refactoring HOT 2
- Make srid & dim fields of all writers private, and add ctor
- Introduce global dimension constants
- Better support for sparse properties by declaring schema when available HOT 1
- Clarification of `GeomProcessor` methods HOT 1
- `point_begin`/`point_end` should be called around `xy` for each Point in a MultiPoint HOT 1
- GeoPackage reader (GeozeroDatasource impl) HOT 3
- Move geozero-shp into geozero? HOT 3
- Impl `GeozeroGeometry` for concrate type should impls srid() and dims() HOT 1
- `BufferedGeozeroDatasource` for spatial filtering on reading
- Documentation for parsing GeoJSON from a file HOT 6
- Support for writing WKT with precision
- `geos::Geometry` to `ewkt` panic
- Add "Geospatial" category to `Cargo.toml` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geozero.