[OSM-talk] osm2shp

Jon Burgess jburgess777 at googlemail.com
Mon Oct 22 19:40:59 BST 2007


On Mon, 2007-10-22 at 03:56 -0700, Mikel Maron wrote:
> 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.

I was thinking of something along the same lines. It is already possible
to run osm2pgsql and then export shapefiles with pgsql2shp (with POINT,
LINESTRING and POLYGON geometries).

When I wrote osm2pgsql I always intended that there could be alternative
output layers. In theory it should be possible to skip Postres and go
from OSM to 3 shapefiles. I suspect the code would need a lot of
modification if you wanted to convert it into an OGR driver.

	Jon






More information about the talk mailing list