Frank Broniewski:
Hi Nikos,I am using a similar approach to yours to extract data from OSM files to a GIS format. I chose Spatiallite as a format since it is superior to the Shapefile format in all areas. FYI here’s what I do:
osmconvert -b="5.5,49,8,50.5" -o=saarland.osm.pbf "europe-latest.osm.pbf"
ogr2ogr --config OSM_CONFIG_FILE /home/frank/gdal/osmconf.ini -f SQLite -dsco SPATIALITE=YES -progress -gt 65536 -t_srs "EPSG:31466" >/tmp/saarland.sqlite /tmp/saarland.osm.pbf
Please note the “–config” switch for a custom osmconf.ini. With that you can copy the config to a custom location and have several configs for many use cases.
Thank you Even and Frank! I will likely adopt the `osmconf.ini` method. @Frank, I would go a step further if time permits. A function or script that takes something like `layer=lines` and `keys="track,footway,bridleway,path"` as input parameters and outputs the custom configuration file. From reading the driver's manual [0], there is a hint about the spatial, filtering resulting in lines or polygons missing vertices. Is this a/the reason, to stick to `osmconvert` for extracting areas of interest? Thank you for your (invaluable) time, Nikos [0] http://www.gdal.org/drv_osm.html
signature.asc
Description: PGP signature
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
