I am trying to convert an .osm file to a .shp file.
I am using OGR2OGR. There is an article at Openstreetmap which explains how this can be done. Here is an example command:
ogr2ogr.exe --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile" output.shp input.osm
And it works perfectly. As a result of upper command, in the "output.shp" folder I get four separate .shp files: lines.shp, multilinestrings.shp, multipolygons.shp, points.shp
However what I would like to get is a single .shp file. So basically to convert an .osm file to a single .shp file.
Is it possible to do that directly through some change of the upper command?
If not then I tried to merge all these four .shp file into a single .shp file (merged.shp). I found an example topic here at gis.stackexchange. So I used the following 4 commands:
ogr2ogr.exe -f "ESRI Shapefile" merged.shp lines.shp ogr2ogr.exe -skipfailures -f "ESRI Shapefile" -update -append merged.shp multilinestrings.shp ogr2ogr.exe -skipfailures -f "ESRI Shapefile" -update -append merged.shp multipolygons.shp ogr2ogr.exe -skipfailures -f "ESRI Shapefile" -update -append merged.shp points.shp
And the merged.shp file is created, but an error is raised at the upper last (fourth) command:
Attempt to write non-linestring (POINT) geometry to ARC type shapefile.
I tried to google but I couldn't solve this error.
Can somebody please help me?