[OSM-talk] osm2shp

Mikel Maron mikel_maron at yahoo.com
Mon Oct 22 11:56:00 BST 2007


I've been interested in OGR support of OSM for a while. At the OSGeo code sprint in Victoria, I pushed on this a little bit (not getting too far). There's another OSGeo code sprint in Merano, Italy next month -- maybe another opportunity.

There's a few issues...

* The topological model of OSM doesn't map neatly onto the Simple Features model used in OGR. Importing OSM into OGR is lossy. Outputting OSM is not enough information. There is postprocessing which could work to bridge the gap (ie identical vertex locations in lines are most likely intersections), but additional complexity and not a neat mapping.

* Some kind of configuration for tags. I'm not certain how non-geographic feature properties are handled in OGR. Perhaps there's some similarity here to how planet is transformed into postgresql tables for mapnik rendering.

* OGR is hardcore. I still haven't wrapped my head around what it takes to write a driver.

So those are the issues. It's still a very good idea to integrate into OGR -- both from a practical and advocacy standpoint. It's just going to be a little harder to do than hacking on osm2shp. I'm willing to put some work in here .. anyone else?

Mikel

----- Original Message ----
From: Matthew Perry <perrygeo at gmail.com>
To: Nick Whitelegg <nick at hogweed.org>
Cc: talk at openstreetmap.org
Sent: Saturday, October 20, 2007 9:35:50 PM
Subject: Re: [OSM-talk] osm2shp


Nick,

 I'm not sure if this is in the works already but it would be nice to
see 3 output shapefiles; one each for points (eg place names), lines
(the roads) and polygons (closed ways, parks, etc).

And this one is a long shot but have you considered writing osm2shp as
an OGR driver (http://www.gdal.org/ogr/). It would allow you to
convert OSM to/from any of the formats already supported
(http://www.gdal.org/ogr/ogr_formats.html). Just a thought.

Thanks,
matt


On 10/20/07, Nick Whitelegg <nick at hogweed.org> wrote:
>
> Now we have 0.5 I *may* (no promises mind!) find time to work more on
 osm2shp,
> the .osm to shapefile conversion utility, a process which should be
 much less
> painful now those darned segments are out of the equation :-)
>
> So does anyone have any particular requests for capabilities?
>
> Nick
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>


-- 
Matthew T. Perry
http://www.perrygeo.net

"Never ascribe to malice, that which can be adequately explained by
incompetence."

_______________________________________________
talk mailing list
talk at openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk







More information about the talk mailing list