QGEP / QGEP

QGIS project and useful stuff for TEKSI wastewater module (Project QGEP)
https://www.teksi.ch
47 stars 28 forks source link

how to delete a selection of detailed geometries #656

Closed urskaufmann closed 3 years ago

urskaufmann commented 3 years ago

detailed geometries can be deleted with the remove part tool (chap 2.2.6.5 in the QGEP-docu). You have to click on every detail geometry. How can I delete a selection of detailed geometries without clicking every record?

ponceta commented 3 years ago

If you mean without removing the corresponding wastewater structures you can't natively on QGIS.

But I'm sure we can add a small action to do this? Or ask for a QGIS core feature?

Remove_multiple_detailed_geometries

urskaufmann commented 3 years ago

@ponceta : Yes, without deleting the wastewater structure. Otherwise it's easy. What you show in the video is the thing described in chap. 2.2.6.5. It works also without selecting the polygon before. My problem: I got Geonis-Data - and there you have a detailgeometrie with every reach and every manhole...

sjib commented 3 years ago

@urskaufmann Can't you just delete the detailed_geometry in pg_admin in the database. Something like: DELETE detailed_geometry_geometry FROM qgep_od.reach WHERE ... (and make a selection, if you do not want to DELETE all)?

urskaufmann commented 3 years ago

Something like (but do not know the right expressions): UPDATE qgep_od.wastewater_structure SET detail_geometry_geometry = '' WHERE fk_main_wastewater_node IS NULL

sjib commented 3 years ago

UPDATE qgep_od.wastewater_structure SET detail_geometry_geometry = NULL WHERE fk_main_wastewater_node IS NULL funktioniert bei mir.

ponceta commented 3 years ago

@urskaufmann Does this solve your problem? Or do we need some graphical tool?

urskaufmann commented 3 years ago

Yes, if there is a simply WHERE definition and if I am a database admin. No, if I am a qgep-user. It should be possible to delete all detail_geometries of a selection in the layer od_wastewater_structure. And to make a selection, there should be more attributes (also from related tables as manhole-function, specialstructure-function) in the attribute table, which means, it should be a view.