[gdal-dev] Extracting keys & values from OSM Planet

Nikos Alexandris nik at nikosalexandris.net
Tue Nov 7 07:15:42 PST 2017


Dear OSM experts,

a reproducible workflow that extracts specific tags from OSM's Planet
data set, includes:

1. downloading OSM Planet in form of a pbf file

2. convert pbf to o5m using `osmconvert`

3  extract areas of interest in separate `aoi_*.o5m` files, based on boundaries in form of .poly
files, using `osmconvert`

4. filtering for specific tags (i.e. highways), parallel tasks in 80 cores

```bash
# custom function for 'highway' tags
function osmfilterhighway { osmfilter $1 --drop-version --keep="highway=track =footway =bridleway =path" > $(basename $1 .o5m)_highway.osm; }
export -f osmfilterhighway

# filter
find . -type f -name \*aoi*.o5m |parallel -j80 osmfilterhighway {}
```

1. Is it any better using GDAL's `osmconf.ini` "method" [0],
over `osmconvert` and `osmfilter`, in terms of reliability/speed etc.?

2. Is OGR handling well the conversion from .osm to ESRI Shapefiles?

3. What is the way to split "other_tags" in multiple new fields *when*
knowing exactly which tags are contained and should be obtained?

Thank you for any help,

Nikos


[0] https://svn.osgeo.org/gdal/trunk/gdal/data/osmconf.ini
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171107/eaa3d190/attachment.sig>


More information about the gdal-dev mailing list