[gdal-dev] R: Question
Giorgio Ghiggini
gghiggini at gec-it.com
Wed Aug 26 08:09:34 PDT 2015
Hi,
thanks a lot for the prompt response.
I am using GISINTERNALS installation, and when I run the ogrinfo app it returns an error saying "all_tags not recognized as a valid field".
I am not sure this installation is working well, my feeling is that any change I apply to the osmconf.ini are simply not used. Maybe the ogr2ogr and ogrinfo are not using the right path to get the osmconf.ini.
Could you suggest me a Windows GDAL binary to install?
Best regards,
Giorgio
-----Messaggio originale-----
Da: gdal-dev-bounces at lists.osgeo.org [mailto:gdal-dev-bounces at lists.osgeo.org] Per conto di Jukka Rahkonen
Inviato: Wednesday, August 26, 2015 4:34 PM
A: gdal-dev at lists.osgeo.org
Oggetto: Re: [gdal-dev] Question
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-
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list