[Qgis-developer] Suppress rendering of small features
Andreas Neumann
a.neumann at carto.net
Thu Sep 12 02:19:51 PDT 2013
Hi Matthias,
Thank you for your preliminary results. I think they are encouraging to
further look into this issue.
Andreas
Am 12.09.2013 10:28, schrieb Matthias Kuhn:
> Hi,
>
> 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".
>
> On Don 12 Sep 2013 08:51:43 CEST, Andreas Neumann wrote:
>> Hi,
>>
>> Another interesting thing would be to simplify features when you zoom
>> out. Maybe simplifying would be quicker than rendering thousands of
>> unnecessary vertices. Optionally this could also be "outsourced" to the
>> database - many databases support simplification on the db level. I
>> don't know if it would really speed up things. One would have to test.
>
> I did a preliminary analysis for this.
> I created a view on a postgis DB containing ~17000 line features with
> the geometry column simplified to 10m in the view.
>
> *Non Simplified*
> ./output/bin/qgis_bench --iterations 20 --width 1024 --height 768
> bench-full.qgs
> iterations: 20
> total_avg: 0.4246
> total_max: 0.657
> total_maxdev: 0.2324
> total_min: 0.407
> total_stdev: 0.0535176606364665
>
> *Simplified*
> ./output/bin/qgis_bench --iterations 20 --width 1024 --height 768
> bench-simplified.qgs
> iterations: 20
> total_avg: 0.09615
> total_max: 0.098
> total_maxdev: 0.00184999999999998
> total_min: 0.095
> total_stdev: 0.000792148975887722
>
> 0.42 / 0.09 is more than 400% performance improvement for this simple
> case.
>
> The results of course depend heavily on the particular setting, but I
> think this looks indeed like a road we should have a look into.
>
> (Setup: PostGIS 2.0.3 in a kvm virtual machine on the same physical
> machine. No styling at all took place on the layer)
>
> Matthias
>
>>
>> Andreas
>>
>>
>>
>> Am 12.09.2013 07:57, schrieb aperi2007:
>>> Not always is preferrable to suppress the small features.
>>> Often in our rendering we prefere to substitute a small rendering of
>>> kind polygon with a point rendering at lowest scales.
>>>
>>> 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.
>>>
>>> Andrea.
>>>
>>> On 12/09/2013 02:13, Nyall Dawson wrote:
>>>> Hi all,
>>>>
>>>> I've been chatting with Nathan about adding a feature to QGIS which
>>>> would allow suppression of rendering features smaller than a set
>>>> threshold for vector layers. (There's already a similar function in
>>>> the labelling engine "Suppress labeling of features smaller than").
>>>> This feature would come in handy for me for several tables which
>>>> contain a wide range of very small -> very large features, which cause
>>>> slow rendering at small scales.
>>>>
>>>> I'm just checking that if I code this up it's not going to be
>>>> duplicated effort - Nathan is under the impression that someone else
>>>> has been talking about adding something similar. Is there currently
>>>> any plans for a feature like this, or should I get started?
>>>>
>>>> Nyall
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Qgis-developer mailing list
>>>> Qgis-developer at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Qgis-developer mailing list
>>> Qgis-developer at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
More information about the Qgis-developer
mailing list