Saturday 31 October 2015

qgis processing - Can vector layer get start point and end point of line using PyQGIS?


I want to make a buffer on the start or end point of the line and not the line itself.


Is there some thing in QGIS python plugin development that can get me the points?




Answer



You can use v.to.points Processing Toolbox Algorithm.


At the next image, it can be observed:



  • Filtering by v.to.points

  • Selecting 'line' (shapefile used in this example) in 'Input lines layer'

  • Marking 'Write line nodes' option


enter image description here


After click in Run, I got "start and end points of each feature" in the shapefile line layer.



enter image description here


However, by using 'Write line vertices' option you can get all points:


enter image description here


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...