2

If I have an existing row in my PostGIS database with NULL geometry, is it possible to select a feature from another layer in QGIS, and paste that into the empty geometry column for the PostGIS row?

2
  • Import the Shapefile that contains the feature into PostGIS (keeping them in the same SRIDs), you can use shp1pgsql or pgShapeLoader
  • Select the geometry of the feature (Apply a filter, button in the top panel near the SQL query button, select the feature you want to copy the geometry of)
    enter image description here
  • Double click the geometry, copy it and then paste it in the NULL geometry column. enter image description here
| improve this answer | |
  • I'm not sure I follow. Where am I doing the copying and pasting? Within QGIS? I don't see geometry columns in QGIS. I can see them in the DB Manager, but cannot copy/paste. Maybe I could ask the question in a more general way: what is the best way to move a single feature from a shapefile to a PostgreS table -- especially in a case where the table schema of the shapefile doesn't exactly match that of the PostgreS table? – user13706 Feb 15 '16 at 3:58
  • You'll copy and paste them in PostGIS, you'll have to move the shapefile to PostGIS first – Hasan Mustafa Feb 15 '16 at 4:34

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.