1

I would like if it is possible to modify an attribute table from a Geometry Generator expression.

My goal is, while digitizing points (with Add point feature tool), use a Geometry Generator expression, to automatically add 10 points randomly distributed in space with a maximum distance and at the same time add to the attribute table 10 new records.

Example Add point feature enter image description here

Example Random points added at 10 meter max. distance enter image description here

Acperience
  • 1,112
  • 1
  • 10
  • 2
    Geometry Generator is for visualization only, you can't create new features with it. For this, you have to use Geometry by expression, see https://gis.stackexchange.com/a/392619/88814 For creating random points, see https://gis.stackexchange.com/a/380390/88814 – Babel Feb 05 '24 at 09:07
  • 1
    After you've digitized your points you can use geometry by expression to create a new layer, then merge this with your original layer – BERA Feb 05 '24 at 09:22
  • Thank you for the clarifications. The expression project($geometry,100000,radians(rand(0,360))) is, in part, a solution. I think I could have a complete solution, by developing a button toolbar that does something like Add random point feature. Could recommend me any website or tutorial that explains how to start create QGIS buttons? – Acperience Feb 05 '24 at 09:22
  • 4
    Take a look at "QGIS Actions" for this purpose. – MrXsquared Feb 05 '24 at 09:51

0 Answers0