[OSM-dev] OGR driver for OSM data

Josh Doe josh at joshdoe.com
Thu Mar 8 20:40:53 GMT 2012

On Thu, Mar 8, 2012 at 2:02 PM, Jochen Topf <jochen at remote.org> wrote:
> This idea comes up again and again. Writing a generic OGR driver for OSM data
> would be very difficult, because the data models just don't match. You'd have
> to have some kind of complex mapping between the two worlds. Thats why nobody
> has done it.

There's certainly not a direct mapping, but I don't see why we can't
handle most common cases.
Point -> Node
Way (without area=yes or certain other tags, e.g. leisure=pitch) -> LineString
Way (with area=yes or certain other tags, e.g. leisure=pitch) -> Polygon
Relation (type=multipolygon, with one inner/outer ring) -> Polygon
Relation (type=multipolygon, with more than one one inner/outer ring)
-> MultiPolygon

I don't even care about implementing writing functionality. My
interest is letting non-OSM GIS users easily use OSM data, not for
them to produce OSM data (those in the OSM community can use Osmium,
ogr2osm, etc. for that). The most annoying part is maintaining a list
of tags that generally (in the absence of area=no) indicate a way is
an area.


More information about the dev mailing list