1

Im new at QGIS, started 2 weeks ago. I'm trying to automatize the display of a map and get rid of some "duplicated" layers and all the extra work. I need to know if SAGA's dissolve can be used in the Geometry Generator, using a personalized function. I tried something like the following

from qgis.core import *
from qgis.gui import *

@qgsfunction(args='auto', group='Custom')
def DisolverSAGA(layer, field, feature, parent):
    asd = processing.runalg('saga:polygondissolvebyattribute', layer, field)
    return asd

Honestly, the fact it didn't work doesn't surprise me, I'm too new at this and I'm not a programmer or anything.

Already tried using buffer(collect($geometry,"REGLABEL"),0) in the geometry generator expression, but I'm using that symbology with a transparency and I noticed that the borders of the resulting polygons have different scales of color, as if that generated one different output for each original geometry and they were stacking, thats why im trying to emulate the process used to generate the existing shapefiles

  • I'm not sure if using processing algorithms is possible in the Geometry Generator and if it was, I don't think it's such a good idea as it iterates through each feature which means it need to run the algorithm x times and it would do this every time the map canvas is refreshed. That's a lot of overhead. – Joseph Sep 10 at 9:58
  • I think it can be done, just we dont know how... Iits very time consuming, but the idea is to uncheck rendering, then export to pdf directly after changing data sources. for each different set of parcels. – Opazo Sep 10 at 11:22
  • "uncheck rendering", do you mean by unchecking the symbology legend shown under the layer in the Layers Panel? – Joseph Sep 10 at 11:31
  • Im new and using a spanish version, it says "Representar". When I uncheck it, the map window stops refreshing – Opazo Sep 10 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.