<div dir="ltr">Could this be done using a rule-based expression through the creation of a variable that returns the pixel-size area of a polygon / pixel-size length of a line?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Sep 12, 2013 at 3:28 PM, Matthias Kuhn <span dir="ltr"><<a href="mailto:matthias.kuhn@gmx.ch" target="_blank">matthias.kuhn@gmx.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
How would you define small? I guess something can already be done with<br>
scale based visibility, but that needs preprocessing of the data and<br>
assigning some kind of "size class".<br>
<br>
On Don 12 Sep 2013 08:51:43 CEST, Andreas Neumann wrote:<br>
> Hi,<br>
<div class="im">><br>
> Another interesting thing would be to simplify features when you zoom<br>
> out. Maybe simplifying would be quicker than rendering thousands of<br>
> unnecessary vertices. Optionally this could also be "outsourced" to the<br>
> database - many databases support simplification on the db level. I<br>
> don't know if it would really speed up things. One would have to test.<br>
<br>
</div>I did a preliminary analysis for this.<br>
I created a view on a postgis DB containing ~17000 line features with<br>
the geometry column simplified to 10m in the view.<br>
<br>
*Non Simplified*<br>
./output/bin/qgis_bench --iterations 20 --width 1024 --height 768<br>
bench-full.qgs<br>
iterations: 20<br>
total_avg: 0.4246<br>
total_max: 0.657<br>
total_maxdev: 0.2324<br>
total_min: 0.407<br>
total_stdev: 0.0535176606364665<br>
<br>
*Simplified*<br>
./output/bin/qgis_bench --iterations 20 --width 1024 --height 768<br>
bench-simplified.qgs<br>
iterations: 20<br>
total_avg: 0.09615<br>
total_max: 0.098<br>
total_maxdev: 0.00184999999999998<br>
total_min: 0.095<br>
total_stdev: 0.000792148975887722<br>
<br>
0.42 / 0.09 is more than 400% performance improvement for this simple<br>
case.<br>
<br>
The results of course depend heavily on the particular setting, but I<br>
think this looks indeed like a road we should have a look into.<br>
<br>
(Setup: PostGIS 2.0.3 in a kvm virtual machine on the same physical<br>
machine. No styling at all took place on the layer)<br>
<span class="HOEnZb"><font color="#888888"><br>
Matthias<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Andreas<br>
><br>
><br>
><br>
> Am 12.09.2013 07:57, schrieb aperi2007:<br>
>> Not always is preferrable to suppress the small features.<br>
>> Often in our rendering we prefere to substitute a small rendering of<br>
>> kind polygon with a point rendering at lowest scales.<br>
>><br>
>> This is possible using the Rule-Rendering<br>
>> also is possible to use the rule-rendering to define a rule that in a<br>
>> scale interval and with a dimension interval the feature is render using<br>
>> a point rendering and change in a polygon rendering when the scale grow.<br>
>><br>
>> Andrea.<br>
>><br>
>> On 12/09/2013 02:13, Nyall Dawson wrote:<br>
>>> Hi all,<br>
>>><br>
>>> I've been chatting with Nathan about adding a feature to QGIS which<br>
>>> would allow suppression of rendering features smaller than a set<br>
>>> threshold for vector layers. (There's already a similar function in<br>
>>> the labelling engine "Suppress labeling of features smaller than").<br>
>>> This feature would come in handy for me for several tables which<br>
>>> contain a wide range of very small -> very large features, which cause<br>
>>> slow rendering at small scales.<br>
>>><br>
>>> I'm just checking that if I code this up it's not going to be<br>
>>> duplicated effort - Nathan is under the impression that someone else<br>
>>> has been talking about adding something similar. Is there currently<br>
>>> any plans for a feature like this, or should I get started?<br>
>>><br>
>>> Nyall<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Qgis-developer mailing list<br>
>>> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
>>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Qgis-developer mailing list<br>
>> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>><br>
><br>
> _______________________________________________<br>
> Qgis-developer mailing list<br>
> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
<br>
<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</div></div></blockquote></div><br></div>