1
vote
Generate layer preview icons
For a QgsVectorLayer:
>>> renderer = layer.renderer()
>>> legendSymbolItems = renderer.legendSymbolItems()
>>> legendSymbolItem = legendSymbolItems[0] # more if more ...
1
vote
Selecting point/feature in layer using coordinates
This pyqgis code finds features in the active layer that intersect with a specified point. It iterates through the layer's features, checks for intersections with the point and prints the feature id
# ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
pyqgis × 7346qgis × 2823
python × 1106
qgis-3 × 1087
qgis-plugins × 992
qgis-processing × 618
pyqgis-3 × 310
qgis-2 × 291
raster × 235
layers × 201
pyqt × 194
fields-attributes × 182
print-composer × 168
gdal × 148
shapefile × 144
python-2.7 × 142
attribute-table × 127
postgis × 123
qgis-python-console × 121
standalone × 118
coordinate-system × 116
symbology × 116
pyqt5 × 105
vector × 89
vector-layer × 89