proj icon indicating copy to clipboard operation
proj copied to clipboard

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

Open phayes opened this issue 2 years ago • 1 comments

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 avatar Feb 04 '22 20:02 phayes

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.

phayes avatar Feb 05 '22 16:02 phayes