[Qgis-developer] How to detect a categorized/graduated 2.5D layer in Python

Tom Chadwin tom.chadwin at nnpa.org.uk
Thu Jul 7 01:12:18 PDT 2016


So you can use a 2.5D renderer, then change to eg categorized or graduated,
and the stack of geometry generators (shadow, walls, roof) remains in place.
I have to detect these latter types of renderers in Python. I do so by
looking for that signature stack of symbol layers. This works.

However, I loop through every feature in a layer when doing this check, my
vague thought being that some features might have different symbology, but
that others might still be derived from 2.5D. The problem I have is that
this slows things down to a crawl, with multiple layers and many features.

Therefore:

1. Is it overkill to loop through all features - should I just check the
first feature in each layer?

2. Does anyone have a more efficient way of detecting these "derived from
2.5D" renderers?

Thanks

Tom



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-detect-a-categorized-graduated-2-5D-layer-in-Python-tp5275092.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list