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
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
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
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
-
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
> 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
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
>