I want to use the code snippets of "Generate points(pixel centroids) inside polygon" plugin in Processing Toolbox of QGIS. I tried searching in QGIS github, but couldn't find it.


I think this is the GitHub page of the tool you're looking for:


You can also find this in your QGIS directory. For example, in my QGIS 2.16.1 standalone directory, it is located in:

C:\Program Files\QGIS 2.16.1\apps\qgis\python\plugins\processing\algs\qgis\PointsFromPolygons.py
  • It is enlightning to know the directory where the source code for processing algorithms are ! But I noticed that there is no algorithm named "Generate points(pixel centroids) inside polygon" or with similar name.. Does this mean that the plugin uses multiple algorithms? – Sai Krishna Oct 7 '16 at 15:04
  • 1
    @SaiKrishna - In line 48 of the link, you will see that it is named "Generate points(pixel centroids) inside polygon" in the menus, the script is not called that. You can also note the input parameters in the script which matches the same parameters when you run the tool in QGIS :) – Joseph Oct 7 '16 at 15:07
  • @SaiKrishna - Most welcome and don't worry, I did too =) – Joseph Oct 7 '16 at 15:15

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.