1

I would like to find a way to automatically update the attribute table for shps generated from the clipping tool. My interest is to get an updated area calculation. All my new shapefiles would contain the same attributes since they all come from one single shp, but will have different geometries.

I'm familiar with the use of the Attributes Form option. I tried saving the style of one shp with my fields linked to a default value (let's say $area), but when copying the style into another shape it won't update its area until I first modify its geometry.

Is there a way to refresh the geometry alltogether so the Attributes Form procedure can work?

QGIS Version: 3.20.3-Odense

1 Answer 1

3

You can use a virtual field in your table. This will be updated automatically and will be part of the layer style. Copying the style and giving it to a second layer will keep the virtual field and update the area calculations in the second layer. see attached screenshots:

enter image description here using the "create virtual field" option

enter image description here copy the style from layer1 to layer2

enter image description here after pasting the style to layer2, we have the virtual field with the updated area calculation

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.