2

I have a river network, extracted from a DEM. Then I split it to shorter segments. The split adds some points (as shown in figure) too near to each other. I wonder how I should remove those small lines and simplify the segments?

Example

3

You have a number of tools in QGIS via GDAL and GRASS etc. The most obvious is to go Vector->Geometry Tools->Simplify geometries and set the tolerance for the distance between vertices. This will eliminate vertices closer than a the set distance (and thereby eliminate the short lines).

In GRASS (via the Processing Toolbox), there is v.generalize.simplify and in this tool you can choose the algorithm by which thesimplification takes place (such as Douglas-Peuker etc).

  • For more details about v.generalize, please see GRASS user manual -> grass.osgeo.org/grass73/manuals/v.generalize.html – HDunn Aug 21 '17 at 8:32
  • 1
    @RingZero - Don't forget to accept this answer by clicking the green-faded tick on the left-hand side :) – Joseph Aug 21 '17 at 9:17
  • 1
    The tolerance in Douglas-Peuker simplification is not the distance between subsequent vertices. It means how much any point on the the simplified line is allowed to be off from the original line en.wikipedia.org/wiki/…. Simplification by using the minimum segment length as tolerance will remove those short segments but usually it will also remove some much longer segments. If that is acceptable or not depends on the use case – user30184 Aug 21 '17 at 9:45
  • Quite right. It is however, an example of one of the algorithms available. – MappaGnosis Aug 21 '17 at 12:13
1

Thanks a lot guys. I just wanted to take a moment to express my gratitude to grass and qgis developers. I solved the problem with my rivers using simplification of the vectors tool. Many thanks to the people in stack exchange community for the wonderful and great support. I doubt that any commercial software developer can afford to be this much effective. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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