[Talk-us] Shape to OSM conversion

Ian Dees ian.dees at gmail.com
Fri Jul 25 14:55:35 BST 2008


On Fri, Jul 25, 2008 at 6:10 AM, Victor Snesarev <victor.snesarev at gmail.com>
wrote:

>
> First of all, it seems that a generic Shapefile-to-OSM script is impossible
> to write without writing a conversion application around it.
>

My thought on this is that there are two use cases:

1. Convert a relatively small (a county or city's worth of road centerlines,
for example) shapefile to OSM, open it in JOSM, and use the find/tag
features of JOSM to apply OSM tags and upload to OSM servers.

2. Mass import of huge sets of shapefiles (all of the TIGER data, for
example). In this case, a set of rules mapping shapefile data fields to OSM
key/value pairs could be pre-set via a rules file or in code.

So far, I think (1) would work just fine in most cases.


> Street centerline data is stored as a PolyLine shape type in the Shapefile,
> while police station locations are Points, and parks are Polygons. Is that
> right?
>

This is true. There are dozens of different geometry types in a shapefile.
So far, the shp_to_osm.py script knows about lines and polygons. Points and
multipolygons are next and would cover the geometry types I've seen in most
shapefiles.


> One more point... Can anyone comment on advantages/dissadvantages of adding
> an OSM export plugin for something like MapWindow<http://www.mapwindow.org/>,
> QGIS <http://www.qgis.org/>, Mapnik <http://mapnik.org/>or some other GIS
> application?
>

I was thinking about writing a plugin for the ogr2ogr app, which would then
allow is to do all sorts of exports/imports on OSM data. Shapefile <-> OSM,
OSM <-> PostGIS, etc.

-Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-us/attachments/20080725/25af04c6/attachment.html>


More information about the Talk-us mailing list