Le jeudi 17 novembre 2016 22:20:02, Djordje Spasic a écrit : > Hello, > > When converting an .osm file to .shp files with ogr2ogr.exe, one needs to > define a list of required fields (keys) in gdal-data\osmconf.ini file, for > each geometry type (points, lines, multipolygons, multilinestrings).Like > so (labelled in red color): [points]#common > attributesosm_id=yesosm_version=noosm_timestamp=noosm_uid=noosm_user=noosm > _changeset=no #keys to report as OGR > fieldsattributes=name,barrier,highway,ref,address,is_in,place,man_made Why > is that so? Why do field names need to be predefined before their > extraction from the .osm file? > > Why can't only those fields which already exist in the .osm file, be > extracted?
That would require doing 2 read passes of the file to determine which fields exist. There's no header mentionning which fields are used. The whole file has to be read. > > > Thank you for the reply. > > Kind regards, > Djordje Spasic -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev