0

I am creating a form for QField use. I have created a polygon mapping layer as part of the form. In the polygon layer I have a field called "area". I just need to know how to configure the field setting so that when I map a polygon in the field (or on desktop) the "area" field is auto populated with the surface area measurement. I am using GDA94 Z55.

1 Answer 1

4
  • In QGIS, double-click your polygon layer to open the Layer Properties.
  • Select the 'Attributes Form' menu from the left-hand side.
  • At the top, change to the 'Drag and Drop Designer'. Drag all of the attributes that you want a user to see when they add a feature (polygon). Drag them from Available Widgets/Fields to Form Layout.
  • Under the Form Layout column, select your "Area" attribute.
  • Find the 'Default' menu on the right-hand side. Set the Default value to $area . Tick the 'Apply default value on update'. Click Apply.

Now when you add an attribute, the area in sq.m. will be calculated. IF you wanted this in a different unit, then type in the math in Default Value. Example: hectares. 10,000 sq.m. = 1 ha. So, $area/10000 would calculate the area in ha.

You can design other options in this Drag and Drop Designer like setting a value to Required or set a range of numbers. This is also where you need to set the attribute to attachment to attach a photo from QField.

Layer Properties Panel/Attribute Form / Drag and Drop Designer

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.