5

I've created 50+ polygons by polygonizing a contour derived from a USGS Digital Elevation Model, and I've and fixed the geometries of the polygon layer.

enter image description here

Now I want to assign an attribute (mtn or valley) to each polygon. It seems like it should be basic to select a polygon and assign or change an attribute in an attribute table field, but I can't find how to do that sort of hand entering values in the attribute table field for over 3500 entries. Is it even possible to do this basic task?

1
  • No other layer with the info. I want to modify an existing layer that is composed of multiple polygon shapes. I expected there would be a simple way to create a new text field in the attribute table, then select a poly and assign the appropriate mtn or valley attribute to that poly. Then I could display them in different colors, label them, or even mass select them.
    – ldekay
    Commented Sep 9, 2021 at 17:39

2 Answers 2

7

QGIS provides Field Calculator (abacus icon in Attributes Toolbar) which allows you to assign (calculate) attribute values to existing or new field, for selection or all features.

You can also use Digitizing Toolbar which after making layer editable, and selecting features provides tool Modify the Attributes of All Selected Features Simultaneously (icon with pen over three rows) to change one or more attribute values for selection.

1
  • The digitizing toolbar solution works perfectly. So simple. I searched and searched but never found the right combination of search terms to discover this simple method. Thanks.
    – ldekay
    Commented Sep 9, 2021 at 18:21
4

You can automate the classification using r.geomorphon:

enter image description here

Zonal histogram then calculate the ratio of ridges (class 5, 6, 7). With my data if the value is <0.6 it is a valley.

enter image description here

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.