I have bathimetry data in .shp format. The points (picture below shows one of multiple groups/profiles) do not have ID numbers and are randomly dispersed through the attribute table.
I have selected each group and added group ID to it. Now each point has "Sort" attribute that serves as the group ID. I still need each individual point to have ID number within the group.
I need these points numbered starting with the northernmost point in group (Field2 in attribute table is northing) and ending with the southernmost. So, a point with highest "Field2" value gets value of 1 in "point_num" field.
Basically, what I need to do is sort selected points according to value of "Field2" attribute. How can I do this with (preferably) QGIS field calculator or some other tool?
Answer
In QGIS 3.0, there is a tool Order by expression
which enables you to sort a field Ascending or Descending:
The Ascending is selected by default. If you want Descending just deselect Ascending and it should work.
The tool can be accessed from Processing Toolbox -> Vector General -> Order by expression
No comments:
Post a Comment