[gdal-dev] Question
Jukka Rahkonen
jukka.rahkonen at maanmittauslaitos.fi
Wed Aug 26 07:34:02 PDT 2015
Giorgio Ghiggini <gghiggini <at> gec-it.com> writes:
> Hello,
> I am trying to use GDAL ogr2ogr.exe but I
> am having problems with osmconf.ini file configuration.
> I tried using different binaries for
> Windows (QGIS, Gisinternals, OSGeo4W and MapServer) but I am not able to get
> all tags from a PBF or OSM file.
> Probably I am not able to configure
> properly the ini file (here attached), but all changes I do, have no impact on
> the result.
>
> Here is the command line I use:
>
>
>
> ogr2ogr -f "ESRI
> Shapefile" -skipfailures -sql "select * from points where other_tags
> LIKE '%peak%'" F:\GEC\Sources\OSM\Italy
> F:\GEC\Sources\OSM\italy-latest.osm.pbf
>
> With this configuration I would like to
> export the “ele” attribute for “natural=peak”, but I am
> not able to get it in my shapefile.
> Any suggestion is very appreciated.
Hi,
Check first the effect of your osmconf.ini with ogrinfo:
ogrinfo hamburg-latest.osm.pbf points -so
With your osmconf.ini I can see attributes:
osm_id: String (0.0)
name: String (0.0)
barrier: String (0.0)
highway: String (0.0)
ref: String (0.0)
address: String (0.0)
is_in: String (0.0)
natural: String (0.0)
place: String (0.0)
man_made: String (0.0)
ele: String (0.0)
all_tags: String (0.0)
You have "all_tags=yes" in osmconf.ini which means at the same that you do
not have other_tags.
Now the following command works for me:
ogrinfo hamburg-latest.osm.pbf
-sql "select * from points where all_tags like '%collection%'"
-Jukka Rahkonen-
More information about the gdal-dev
mailing list