Hot answers tagged

1 vote

Generate layer preview icons

For a QgsVectorLayer: >>> renderer = layer.renderer() >>> legendSymbolItems = renderer.legendSymbolItems() >>> legendSymbolItem = legendSymbolItems[0] # more if more ...
bugmenot123's user avatar
  • 10.2k
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 # ...
foxhq's user avatar
  • 81

Only top scored, non community-wiki answers of a minimum length are eligible