1

Can the tools in QGIS, e.g. Vector>>>Geometry Tool>>>Extract Vertices be used in Python code? For example, to run through a shapefile to get all the points for for polygons within the file?

SMiller
  • 3,706
  • 9
  • 22
  • 1
    Yes, many of the tools in QGIS can be used in scripting. Start with the official documentation for PYQGIS: https://docs.qgis.org/testing/pdf/en/QGIS-testing-PyQGISDeveloperCookbook-en.pdf or this online tutorial: https://www.qgistutorials.com/en/docs/getting_started_with_pyqgis.html – SMiller Jun 11 '18 at 13:29
  • I have looked at those before but still can't find where you can access a tool like I mention above. I am used to arcpy where you can just pull up the tool and it also has the python syntax for it as well. – jacob Blankenship Jun 11 '18 at 13:48
  • Hi @jacobBlankenship I think this is a good and valid question. There are a few answers that already touch on this, but are hard to find. See: https://gis.stackexchange.com/questions/284754/how-to-adjust-python-code-from-pyqgis-2-to-3-to-create-a-buffer-on-a-shapefile/284756#comment455884_284756 and https://gis.stackexchange.com/questions/279874/using-qgis3-processing-algorithms-from-standalone-pyqgis-scripts-outside-of-gui/279937#279937 – HeikkiVesanto Jun 11 '18 at 13:54
  • For "Extract Vertices", could it be "Extract Nodes"? https://docs.qgis.org/2.8/en/docs/user_manual/processing_algs/qgis/vector_geometry_tools/extractnodes.html – SMiller Jun 11 '18 at 14:12
  • I am using QGIS 3.0 so I think it changed – jacob Blankenship Jun 11 '18 at 14:14

0 Answers0