Skip to main content
Removed tag prefix from question title as per Jeff Atwood style preference
Link
underdark
  • 84.5k
  • 22
  • 233
  • 415

QGIS sort Sort selected points by latitude/northing with field calculator

edited tags
Link
ahmadhanb
  • 41.4k
  • 5
  • 54
  • 109
Source Link

QGIS sort selected points by latitude/northing with field calculator

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.

enter image description here enter image description here

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?