– Usando PyQGIS en scripts individuales
– Usando PyQGIS en aplicaciones personalizadas
– Running Custom Applications
Este documento pretende funcionar como un tutorial y como una guía referencia. Aunque no muestra todos los
posibles casos de uso, debería dar una buena perspectiva de la funcionalidad principal.
Starting from 0.9 release, QGIS has optional scripting support using Python language. We’ve decided for Python
as it’s one of the most favourite languages for scripting. PyQGIS bindings depend on SIP and PyQt4. The reason
for using SIP instead of more widely used SWIG is that the whole QGIS code depends on Qt libraries. Python
bindings for Qt (PyQt) are done also using SIP and this allows seamless integration of PyQGIS with PyQt.
There are several ways how to use Python bindings in QGIS desktop, they are covered in detail in the following
sections:
• automatically run Python code when QGIS starts
• Comandos de objeto en la consola Python con QGIS
• Crear y usar extensiones en Python
• Crear aplicaciones personalizadas basadas en la API de QGIS
Python bindings are also available for QGIS Server:
• starting from 2.8 release, Python plugins are also available on QGIS Server (see: Server Python Plugins)
• starting from 2.11 version (Master at 2015-08-11), QGIS Server library has Python bindings that can be
used to embed QGIS Server into a Python application.
There is a complete QGIS API reference that documents the classes from the QGIS libraries. Pythonic QGIS API
is nearly identical to the API in C++.
A good resource when dealing with plugins is to download some plugins from plugin repository and examine their
code. Also, the python/plugins/ folder in your QGIS installation contains some plugin that you can use to
learn how t
Comentarios de: PyQGIS developer cookbook (0)
No hay comentarios