Based on QGIS 3.4 and PostGIS 2.5:

I imported a shapefile in my PostGIS database using shp2pgsql.

When I connect to my PostGIS database, I see that 2 tables were imported. One with the hint "geom as Point in -2147483648" and one with the hint "geom as Point in 0". When I add the one with -2147483648 to the map, I see no features and the attribute table is empty. The other table (with "geom as Point in 0") works fine (I can see the features and the records in the attribute table)

Also when I create a new table from scratch (with a geometry field) using the database manager in QGIS, 2 tables are created with the same result. Why?

What is the table/layer with -2147483648 for? Why is it created and can I delete it somehow or is this not recommended? In pgAdmin, I only see one table.

When importing a shapefile with the database manager in QGIS, this table is not created.

Coordinate system: EPSG 4326

Windows 7, 64 bit

Here is an image how it looks when I connect to PostGIS in QGIS (ignore the white space):

enter image description here

  • 1
    looks like you need to provide the -s from_srid:to_srid in your import process here is a quick guide bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg – Mapperz Nov 15 '18 at 15:03
  • thank you. I had to specify the SRID (which is by default 0) in shp2pgsql. After setting it to 4326, only one table was visible after connecting to the postgis database. So it is working now! Still interresting what this -2147483648 is about... – GIS7 Nov 15 '18 at 15:38
  • 1
    ...that is the lowest number possible for a 32bit signed integer, and I guess it's shp2pgsql to say 'couldn't define, could be anything'. – ThingumaBob Nov 16 '18 at 9:40
  • thank you. Stil interesting why the features are displayed at the layer with "geom as point in 0" and not in the "-2147483648 layer". There isn't defined the srid either. After defining a srid i see "geom as point in 4326". Anyway, I found a solution :) – GIS7 Nov 16 '18 at 9:48

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.