[Qgis-developer] Suppress rendering of small features

Alexander Bruy alexander.bruy at gmail.com
Thu Sep 12 03:51:01 PDT 2013


Hi,

I raised similar question about year ago, but instead hiding small features
I propose to do simplification. I also implemented some test code and
results were pretty good — redraw is quicker in several times. But my code
still hacky and not optimal.

Also there were GSoC project, but it was not completed. If you interested,
I can try to find code.

2013/9/12 Nyall Dawson <nyall.dawson at gmail.com>:
>> This is possible using the Rule-Rendering
>> also is possible to use the rule-rendering to define a rule that in a
>> scale interval and with a dimension interval the feature is render using
>> a point rendering and change in a polygon rendering when the scale grow.
>>
>
> While it is possible to set up rules to achieve a similar result, it's
> quite a lot of work. It's also important to note that the feature I
> propose would mean it's still possible to use graduated or categorized
> renderers on a layer - again, the end result (scale/sized based
> filtering together with categorized rendering) would be achievable by
> creating a bunch of rules, but it would be a lot of work and the end
> result would be much more rigid....
>
>> As I understand, the feature to suppress small/large features would be
>> optional.
>>
>
> Yes - definitely optional and off by default!
>
>> How would you define small? I guess something can already be done with
>> scale based visibility, but that needs preprocessing of the data and
>> assigning some kind of "size class".
>
> I'm thinking of using the same method as the "Suppress labelling of
> features smaller than" feature from the labelling engine. This gives
> you a choice of feature size in mm to use as a threshold, and in my
> experience works quite well.
>
> I think it's important to note that hiding small features isn't just
> about a performance win - it's also useful from a cartographic
> perspective. My main use case involves a large water body dataset I
> frequently use, which contains everything from large lakes and inlets
> to very small dams and reservoirs. I need to have the large features
> show up at all scales, but I don't want all these smaller features
> cluttering up my map at small scales. This feature would mean I could
> easily hide the little lakes from my map at small scales, but they'd
> show up as I zoom in.
> Sure, this could all be done by assigning a hierarchy to the features
> and setting up a bunch of rules in a rule based renderer - but it
> would be so much quicker and easier to just tick a box and tweak the
> threshold size to suit.
>
>> Another interesting thing would be to simplify features when you zoom
>> out. Maybe simplifying would be quicker than rendering thousands of
>> unnecessary vertices.
>
> Wasn't there a summer of code project with this goal a few years back?
> Does anyone know what the outcome of that project was?
>
> Nyall
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer



-- 
Alexander Bruy


More information about the Qgis-developer mailing list