pyosmium
pyosmium copied to clipboard
Python __geo_interface__ support
geo_interface is a protocol for Python libraries to exchange geospatial data (A Python Protocol for Geospatial Data). The data is put in standard Python objects (dict,list,tuple,float) in a GeoJSON-like fashion. It would be nice if pyosmium woud support this interface.
Geo Interface is already supported by a lot of other Python modules: Shapely, Fiona, ArcPy, descartes, geojson, PySAL, pyshp
Implementing this interface means adding a function geo_interface() to a number of classes in osmium.osm: Node, Way and Area, maybe also to Location, Box, NodeRef or NodeRefList. Probabily something like GeoJSONFactory, but with boost::python::dict, boost::python::list, etc. instead of std::string
This sounds like a useful addition. Maybe somebody who needs this themselves wants to give it a try?