After applying r.thin
and then r.to.vect
to a raster image the resulting vector layer contains hundreds of small "branches" that are not supposed to be there:
I've tried selecting and deleting these mini branches using a $length
field in the layer's attribute table but that also deleted short segments in the main contours I want to keep.
A solution would be to identify all short paths where nodes_to_points = 2
and number of intersecting vertices = 1
as this would leave out the paths that are part of the contour (and therefore have 2 intersecting vertices).
Does anybody know how to write this as an expression in the Field Calculator or can think of a better way to remove my unwanted artefacts?
v.clean
withrmdangle
parameter