1

I'm converting an osm .pbf file to a postgres/PostGIS database with ogr2ogr. I can view the tables in psql, but when I connect to the database in qgis, I can't see any of the tables after connecting to the database. I'm using the standard osmconf.ini. What am I missing here?

ogr2ogr command:

ogr2ogr -progress -overwrite --config OSM_CONFIG_FILE osmconf.ini -skipfailures -f "PostgreSQL" PG:"dbname=gdal_osm" osmdataset.pbf

In this image you can see that the tables 'multilinestrings', 'multipolygons', etc. are visible in psql, but not when viewed in qgis.

ogr2ogr conversion psql tables missing in qgis

  • 1
    For some reason the geometry_columns table seems to be empty. – user30184 Jan 12 '17 at 20:22
  • I have no experience with ogr2ogr but I have had problems in the past with QGIS when the table did not have a serial ID as the first column in the table. – kttii Jan 12 '17 at 20:30
  • Ogr2ogr does create integer primary key columns. – user30184 Jan 12 '17 at 20:59
  • geometry_columns is empty, but the same is true for other postgis databases that I have which load successfully into qgis. – jamierob Jan 12 '17 at 21:26
  • Strange. I thought that QGIS is first reading the metadata table for finding which tables are spatial, name of the geometry column, geometry type, and SRID. – user30184 Jan 12 '17 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.