[gdal-dev] ogr2ogr does not convert OSM polygons

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Tue Nov 2 08:11:33 PDT 2021


Hi,

What layers does "ogrinfo country_pbf" list? Can you reproduce the error with some small OSM country file from http://download.geofabrik.de/?
What is your operating system and GDAL version? Do you use the default osmconf.ini file? GDAL OSM driver and osm2pgsql are creating quite different database schemas so they are not very comparable.

-Jukka Rahkonen-

Lähettäjä: gdal-dev <gdal-dev-bounces at lists.osgeo.org> Puolesta Clay, Bruce
Lähetetty: tiistai 2. marraskuuta 2021 16.22
Vastaanottaja: gdal-dev at lists.osgeo.org
Aihe: [gdal-dev] ogr2ogr does not convert OSM polygons

When I convert a OSM pbf file to postgres using the following script it does not create a multipolygon table

ogr2ogr -f PostgreSQL PG:"dbname='open_street_map' host='db-host' port='5432' user='postgres' password='pwd'" -lco schema=country country_pbf  --config OSM_MAX_TMPFILE_SIZE 1024

When I do the same thing using osm2pgsql (shown below) it creates the polygon table but not the other_relations table

osm2pgsql -H hostname -U postgres -d open_street_map --output-pgsql-schema=country --create --latlong -G --hstore --tag-transform-script /OpenStreetMap/openstreetmap-carto-master/openstreetmap-carto.lua -C 2500 --number-processes 5 -S /OpenStreetMap/openstreetmap-carto-master/openstreetmap-carto.style country-latest.osm.pbf.

I did not see this problem when I Googled.

Is this a known issue and is there a work around?

Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211102/09465d71/attachment-0001.html>


More information about the gdal-dev mailing list