I've built a database with postgreSQL with tables, which include geometry columns.
When I add some data to my non-geometry columns, I can see them in QGIS when I connect to my database using postgis. Now, I want to add polygons to the existing entries with the editing tool in QGIS. That means, filling up the geometry columns in QGIS.
How can I do this? I've only heard about adding whole shapefiles to the database but not to add single features to a single column.
An example… I have the following table (municipality):
id smallint NOT NULL,
name varchar(50) NOT NULL,
mun_geom geometry(Polygon, 31468)
I can fill the columns id and name in postgresql when I'm connected to my database (like (1,'municipality1')). After adding municipality as a postgis layer I want to complement the entry with adding a polygon feature.
Best Answer
Figured this out! (also asked here)
A record in a spatial table (Shapefile, PostGIS, Spatialite) that has no geometry can have geometry added by adding a 'part' to the feature using the advanced digitizing toolbar. Here's the workflow: