Coords() yields all coordinate tuples from a geometry or
feature object.
Map_coords() maps a function over all coordinate tuples and returns
a geometry of the same type. Useful for translating a geometry in
space or flipping coordinate order.
I've rewritten functions like these a number of times and hope you'll
agree that python-geojson would be a good home for them. The tests
are for pytest, which I'm loving these days (I've converted Fiona and
Rasterio to pytest, am converting Shapely as I go).
Coords() yields all coordinate tuples from a geometry or feature object.
Map_coords() maps a function over all coordinate tuples and returns a geometry of the same type. Useful for translating a geometry in space or flipping coordinate order.
I've rewritten functions like these a number of times and hope you'll agree that python-geojson would be a good home for them. The tests are for pytest, which I'm loving these days (I've converted Fiona and Rasterio to pytest, am converting Shapely as I go).