4

I'm making a plug-in for QGIS, using the python language. I've looked everywhere but I can't seem to find a good overview of all the QGIS functions there are usable in the python script.

For example, let's say I selected a Polygon as a geometry. I know I can calculate the area of the polygon using .geometry().area()

But where do I find an overview of ALL the things I can do with this geometry? The QGIS Cookbook gives a few examples but not everything.

Germán Carrillo
  • 202
  • 2
  • 12
  • I have not used QGIS but have you tried a dir of whatever you are importing into Python? See this Q&A and maybe look for others using the keyword introspection – PyNEwbie Mar 01 '16 at 17:10
  • There is this website: http://qgis.org/api/ But why is it all c++ language? Where's the Python one? – Kristof de Werdt Mar 01 '16 at 18:49
  • 1
    I wonder if this would be better asked, for those who will need the answers in the future, on gis.stackexchange.com – Paul H Apr 08 '16 at 03:51
  • Totally agree with you. Can the whole question be copied there so that it exists on both sites? – Germán Carrillo Apr 08 '16 at 17:35
  • @PaulH Just posted the answer in GIS.SE too, there was a similar question since 2014: http://gis.stackexchange.com/a/188707/4972 – Germán Carrillo Apr 09 '16 at 13:44

2 Answers2

4

There you go:

A diagram of the main PyQGIS relationships (by Thomas Gratier): https://raw.githubusercontent.com/webgeodatavore/qgis-class-diagram/master/diagramme_principal.png

Searchable documentation of QGIS and PyQGIS classes (by SourcePole): http://geoapis.sourcepole.com

For example, properties and methods of the QgsGeometry class are here: http://geoapis.sourcepole.com/qgispyapi-qgsgeometry/

enter image description here

Germán Carrillo
  • 202
  • 2
  • 12
2

geoapis.sourcepole doesn't exists anymore. Here are new ressources for QGIS Python API Documentation

GeoGyro
  • 487
  • 12
  • 32