[gdal-dev] identifying the fields from the .osm file

Etienne Trimaille etienne.trimaille at gmail.com
Sat Nov 19 08:09:06 PST 2016


The parsing is done using python in the plugin. We can just use the parser
by calling the python file. Python is included when you install osgeo4w.

Yes you can set the osmconf.ini or directly use the goal ogr api to write
the output file.

On 19 Nov 2016 18:00, "Djordje Spasic" <issworld2000 at yahoo.com> wrote:

> Thank you for the quick reply Etienne!
>
> I am stuck with ogr2ogr.exe, or GDAL C# libraries. I can not use QGIS or
> other applications.
>
> Indeed Even told me that identifying all fields in the .osm file, would
> require doing 2 read passes of the .osm file.
> I thought that maybe there is a way of doing exactly that, where in the
> first read I would get all the fields, find only those that are unique, and
> then perform a second read by setting these fields in the osmconf.ini file?
>
>
> On Saturday, November 19, 2016 2:40 AM, Etienne Trimaille <
> etienne.trimaille at gmail.com> wrote:
>
>
> Hi,
>
> With ogr2ogr, you can't read all keys from an OSM file.
>
> As Even said, you have to use another loop to read all available keys in
> the file. You can have a look at the QGIS QuickOSM plugin. You can open a
> OSM file and ask the plugin to read all keys available in the file.
>
> 2016-11-19 8:30 GMT+07:00 Djordje Spasic <issworld2000 at yahoo.com>:
>
> During the last couple of days, both Jukka and Even helped me with some
> .osm file issues. And I am grateful on that.
>
> I would like to ask one more question, if that's ok:
> Is it possible to open an .osm file through ogr2ogr.exe and somehow read
> all the fields (keys) used in that .osm file? The final list of those
> fields do not have to be unique, they can repeat.
> Is it possible to somehow save all those fields to a .shp or .txt file
> through ogr2ogr.exe?
>
> Thank you for the reply.
>
> ______________________________ _________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman /listinfo/gdal-dev
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161119/0cfd4dcd/attachment.html>


More information about the gdal-dev mailing list