Open haubourg opened 7 years ago
I think there are some ongoing discussion about the topic on QGIS @m-kuhn any feedback about being able to digitise other geometry columns on QGIS? (a polygon geometry of a point layer)
For our use, I adapted the action Matthias did for the structure layer in QGEP:
lyr = QgsMapLayerRegistry.instance().mapLayer('vw_element_installation20170811111622733')
feature = lyr .getFeatures( QgsFeatureRequest().setFilterExpression( 'id = \'{}\''.format( '[% "id" %]' ) ) ).next()
lyr.startEditing()
lyr.setSelectedFeatures([feature.id()])
qgis.utils.iface.setActiveLayer(lyr)
qgis.utils.iface.actionAddPart().trigger()
You need to add the vw_element_installation as a polygon layer but it works well.
Only problem, you can't snap to the construction point to digitize the polygon #246
Only problem, you can't snap to the construction point to digitize the polygon #246
Is this still the case?
For our use, I adapted the action Matthias did for the structure layer in QGEP:
lyr = QgsMapLayerRegistry.instance().mapLayer('vw_element_installation20170811111622733') feature = lyr .getFeatures( QgsFeatureRequest().setFilterExpression( 'id = \'{}\''.format( '[% "id" %]' ) ) ).next() lyr.startEditing() lyr.setSelectedFeatures([feature.id()]) qgis.utils.iface.setActiveLayer(lyr) qgis.utils.iface.actionAddPart().trigger()
You need to add the vw_element_installation as a polygon layer but it works well.
Should be updated to pyqgis 3
@haubourg Duplicate of https://github.com/qwat/QWAT/issues/204 I think
following Tudor suggestions here #202 a user action to begin adding a geometry polygon part to an installation would be a nice shortcut to help user understand the workflow.
Currently adding a new installation from a polygon layer will fail because of a not null constraint on point geometry (which is good) , so it relies on a good user training.
Not sure it is so easy to do from an action:
The active layer switch can probably be surprising