0

I have a PostGis table I have generated by importing an existing geojson file using ogr2ogr. When I add this table as a layer in QGIS, the layer shows up as having no geometry. In the layer properties I get:

Geometry type of the features in this layer

No geometry (WKB type: "NoGeometry")

The table has geometry data in the wkb_geometry column with binary data, and if I export the table using ogr2ogr I get the correct geojson object reconstructed.

What am I missing here?

  • 2
    "with binary data" can you output the table definition \d? – Evan Carroll Mar 27 '18 at 0:20
  • Not sure what you mean by this or what you are expecting. But the wkb_geometry is of bytea type. – Tristan Rhodes Mar 27 '18 at 8:00
3

PostGis installed, but database not configured for PostGis...

So for future reference, run this:

CREATE EXTENSION postgis

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.