pyosmium icon indicating copy to clipboard operation
pyosmium copied to clipboard

Python __geo_interface__ support

Open MennoTammens opened this issue 9 years ago • 1 comments

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

MennoTammens avatar Mar 09 '16 16:03 MennoTammens

This sounds like a useful addition. Maybe somebody who needs this themselves wants to give it a try?

joto avatar Jul 27 '16 08:07 joto