georust / proj

Rust bindings for the latest stable release of PROJ
https://docs.rs/proj
Apache License 2.0
137 stars 44 forks source link

For Discussion: Adding functionality to allow mutating an iterator of coordinates in place #105

Open phayes opened 2 years ago

phayes commented 2 years ago

Pursuant to the discussion here (https://github.com/georust/geo/pull/718) , I've been playing with the idea of converting / projecting Iterators of mutable coordinates.

This should allow us to convert large geometries with a single-call to Proj.

If folks are amenable to this approach, I'll work on implementing Iterator<Item = &'a mut Coord<CoordinateType>> for geo-types.

phayes commented 2 years ago

Thanks @frewsxcv ,

Let's not merge it just yet. I've been working on the other side of the problem (having geometries generate an iterator that yield mutable references to coordinates) and have run into some major lifetime issues that might be insurmountable without either GATs or unsafe. I'll post more about that once I have it more clear in my mind.