jazzband / geojson

Python bindings and utilities for GeoJSON
https://pypi.python.org/pypi/geojson/
BSD 3-Clause "New" or "Revised" License
908 stars 120 forks source link

Add coords() and map_coords() utils. #34

Closed sgillies closed 10 years ago

sgillies commented 10 years ago

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).

frewsxcv commented 10 years ago

Awesome. These utilities definitely fit within the bounds of this library

frewsxcv commented 9 years ago

Just pushed a new version (1.0.8) that includes these utilities. Better late than never :+1: