Friday, 30 October 2015

Point connection in QGIS




I have to connect points to a polygon. I tried to use "points to path" and "point connector" plugins in QGIS, but neither of them are working. For testing, I just drew 4 points and used "points to path" and "point connector". The created layer does not contain any features. I did the same with importing 4 points from a txt file, the result is the same. Is there some trick on how to use those plugins?



Answer



You need two steps in order to create polygons from points.


First, use points to path or convert points to line(s). You can find both tools in the toolbox. Important:



  1. The algorithm needs to know, which point comes first in a line. Number them accordingly.

  2. The algorithm needs to know, which line a point belongs to, identify them accordingly.

  3. In order to achieve closed lines/rings/loops, your starting points needs to double as ending point. Digitize a second point right on top of it, but give it the last number of the line they both belong to instead of the first.


Second, run convert lines to polygons, also from the toolbox.



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...