5

I am working on a QGIS project where I have a layer called "Developments" within a Geopackage document. The layer is a polygon layer where I add all renewable energy projects within my country.

Most of the projects I have mapped and are showing as polygons on my database; however, there's instances where I know about the existence of a development but cannot plot it on the map as I don't know the exact geographical layout.

Is it possible to add such developments to the layer without including a geometry for the features?

If that was the case, I would still have them as features in my database and access their attributes (technology type, installed power, etc.) even though their geometry is not plotted on the map.

1
  • 2
    Yes you can. Just add an entry in the attribut table.
    – katagena
    Commented Jun 26, 2022 at 9:29

1 Answer 1

2

You can use the "Add Feature" button at the top of the attribute table dialog (in Edit mode) to add rows to the attribute table with "empty" geometry.

Empty geometries do seem to be valid in GeoPackages, but mind out if you have to change them to another file format as bad things might happen if the format does not allow missing geometries.

Note I can't see how to add/modify geometry of a feature with empty geometry if you later want to give it a location. There seems to be no way to select it in the map canvas to add rings etc to it. I might be missing something simple though...

2
  • You can actually add/modify a geometry with the field calculator. select <geom> as the target in the field calculator and give it a geometry for example: geom_from_wkt( 'POINTZ(-85.4847954 32.7928173 -1)' ) or in your case POLYGON etc
    – willemite
    Commented Sep 11, 2023 at 17:47
  • You can also add geometry later by selecting the record in the attribute table and then using 'Add Part' option from the Advanced Digitizing Toolbar. Commented May 3 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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