extrusion_layer = QgsVectorLayerSimple3DRenderer() extrusion_layer.setExtrusionHeight(10) # Height in map units settings.setLayers([layer])
| Resource | QGIS Version | Official PDF? | Works? | |----------|--------------|---------------|---------| | Gary Sherman's PyQGIS Programmer's Guide | 2.x | Yes (paid) | No for QGIS 3 | | Official QGIS PyQGIS Developer Cookbook | 3.x | No (HTML only) | Yes (online) | | Community-made PDF from cookbook | 3.x | Unofficial | Possibly, but risky | pyqgis programmer 39s guide 3 pdf work
Use QgsGeometry.simplify() to reduce vertex count: pyqgis programmer 39s guide 3 pdf work
simplified_geom = geom.simplify(1.0) # tolerance of 1 unit