[OSM-dev] osm2shp

Jochen Topf jochen at remote.org
Sat May 3 07:46:24 UTC 2014


On Fr, Mai 02, 2014 at 08:39:11 +0200, Samat wrote:
> First of all, I would like to tell you, that I am not a programmer, but I
> would like to convert an osm xml to shapefile.
> 
> This osm xml contains the database of a whole country (Hungary), now it is
> around 1,2 GB (downloaded from Geofabrik).
> I would need the *same content* in ESRI shapefile format, including points
> (nodes in osm), polylines (relations in osm) and (multi)polygons/areas
> (closed ways in osm).

There is no way to get OSM data 100% into shapefiles. The OSM data model
is much more flexible than shapefiles, so you have to decide which parts
of the OSM data you want and which parts you can ignore.

> I tried to use tools listed here:
> http://wiki.openstreetmap.org/wiki/Shapefiles#Create_your_own_shapefiles
> but until now I didn't find any tool which works and has the features for
> converting the whole content of a quite large area.
> 
> I am not sure about Osmium: http://wiki.openstreetmap.org/wiki/Osmium
> Is it a ready to use tool for converting osm to shapefile or only a
> developer environment to write codes for that?

There is a tool "osmjs" thats part of Osmium which can be used to easily
and flexibly decide which parts of the OSM data you want in which shapefile
attributes. There are some examples in the osmjs directory.

> Could you please help me out which tool fulfill my needs?

All the tools mentioned on that wiki page have different use cases and
slightly different ways they interpret the OSM data. You'll have to get
more familiar with the data model and then you have to try out those tools
and see which one best fits your needs.

Jochen
-- 
Jochen Topf  jochen at remote.org  http://www.jochentopf.com/  +49-721-388298



More information about the dev mailing list