[gdal-dev] Why are fields required in osmconf.ini file?

2016-12-03 Thread Djordje Spasic
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=yeso

Re: [gdal-dev] Why are fields required in osmconf.ini file?

2016-11-17 Thread Even Rouault
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).Lik

Re: [gdal-dev] Why are fields required in osmconf.ini file?

2016-11-17 Thread jratike80
georges wrote > Thank you for the quick reply Even! > > So this required predefined set of fields is a necessary step for any .osm > file conversion with ogr2ogr.exe? > Not only conversion from .osm to .shp? > But also to .pbf, geojson etc. ? Only exception and highly recommended if you want to g

Re: [gdal-dev] Why are fields required in osmconf.ini file?

2016-11-18 Thread Djordje Spasic
Thank you for the useful reply Jukka! The command you gave me: ogr2ogr -f PostgreSQL "PG:dbname=osm" test.pbf -lco COLUMN_TYPES=all_tags=hstore does the same thing as "all_tags=yes" in the osmconf.ini file: # uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive all_ta

Re: [gdal-dev] Why are fields required in osmconf.ini file?

2016-11-18 Thread Rahkonen Jukka (MML)
- Djordje Spasic wrote: Re: [gdal-dev] Why are fields required in osmconf.ini file? Thank you for the useful reply Jukka! The command you gave me: ogr2ogr -f PostgreSQL "PG:dbname=osm" test.pbf -lco COLUMN_TYPES=all_tags=hstore does the same thing as "all_tags=yes" in the osmconf.in

Re: [gdal-dev] Why are fields required in osmconf.ini file?

2016-12-03 Thread Brad Hards
> 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? How could ogr2ogr possibly know what fields are in the file? It would require a full parse of the file, an

Re: [gdal-dev] Why are fields required in osmconf.ini file?

2016-12-04 Thread jratike80
Brad Hards wrote >> 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? > How could ogr2ogr possibly know what fields are in the file? It would > require >