GIS and Media fusion

"The explosive growth of the GeoWeb and geographic information has made GIS powerful media for the general public to communicate, but perhaps more importantly, GIS have also become media for constructive dialogs and interactions about social issues." - Sui & Goodchild

User Tools

Site Tools


geoinf18:qgsmaprendererjob

This is an old revision of the document!


Tutoriel "QGIS map renderer"

Objectif : comprendre le “portrayal model” portrayalogc.png par l'utilisation du moteur de rendu cartographique de QGIS3 avec sa console Python et les classes QgsMapRendererSequentialJob et QgsMapSettings.

Pour les utilisateur de QGIS2, voici le tutoriel QgsMapRenderer 2015.

Prérequis pour ce tutoriel sur QGIS3

Découverte du "map renderer"

  • pour une couche chargée et sélectionnée dans la table des couches, ouvrir la console Python :
# we work with the selected layer
layer = iface.activeLayer()

# we want to know the current map settings
canvas = iface.mapCanvas()
mapset = canvas.mapSettings()

# we display the mandatory settings to build a map
print(mapset.layerIds())
print(mapset.extent().asWktPolygon())
print(mapset.outputSize())

Contrôle du "map renderer"

geoinf18/qgsmaprendererjob.1542127953.txt.gz · Last modified: 2018/11/13 17:52 by oertz