Friday 4 January 2019

buffer - Buffering in pyQGIS?


I'm looking for some examples to do simple python scripts in QGIS. How would I do a buffer analysis on a dataset?


I can't seem to find much in the manual and QGIS python that quite matches the Esri documentation.



Answer



Have a look at the PyQGIS Cookbook.


Follow the example on how to iterate over a vector layer. Accessing the geometry, you can apply the buffer() method. See also the QGIS API: http://www.qgis.org/api/classQgsGeometry.html#a98208752e1beb1a5d3a7eedffbfdb2e4



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