[QGIS-trac] Re: [Quantum GIS] #3222: Fast,
easy and beautiful on the fly rule-based rendering of OSM maps
Quantum GIS
qgis at qgis.org
Mon Feb 21 17:11:43 EST 2011
#3222: Fast, easy and beautiful on the fly rule-based rendering of OSM maps
------------------------------------------------+---------------------------
Reporter: mayeulk | Owner: wonder
Type: patch | Status: new
Priority: major: does not work as expected | Milestone: Version 1.7.0
Component: Symbology | Version:
Keywords: | Platform_version:
Platform: All | Must_fix: No
Status_info: 0 |
------------------------------------------------+---------------------------
Comment(by mayeulk):
Hi,
Thanks for this Martin!
About symbol levels, I guess you prefer the more definitive fix you said
(in comment:11) you would like to work on. This makes sense. The "last
column (Id)" was necessary for my quick fix to sort the rules according to
id (since with the quick fix only the first matched rule is rendered,
id=priority).
here are a few comments:
1.Making these extensive tests on OSM data gave me the following idea:
Sometimes, we need several rules to apply at the same time. There are at
least about 15 cases like this with OSM data: attributes related to some
of the [http://wiki.openstreetmap.org/wiki/Map_Features#Properties road
properties] (bridge, tunnel, cutting, embankment...) and some of the road
[http://wiki.openstreetmap.org/wiki/Map_Features#Restrictions
restrictions] (access, vehicle, toll, disused...). In most of these cases,
overlaying a primary/secondary/tertiary/unclassified road symbol with a
specific symbol (bridge, tunnel, embankment, ....) will give good visual
result, while necessitating only few more rules. The idea is, for each
rule, to let the user say whether (if this rule is matched) it should be
the last rule tested; there could be a check box next to each rule.
Typically, the first 15 rules could be rules for road properties and
restrictions (those could be combined with other rules, check box would be
unchecked), while the next 100 rules would be for road/lines types (they
would not be combined with additional rules: check box would be checked).
If, say, the 5th rule (among the 100 mentioned above) is matched, then the
95 next rules are ignored [this improves visual quality and has the side
effect of saving CPU time]. In the end, we only need 115 rules instead of
1500 rules (15x100, which is the optimistic case that assumes that the 15
first rules are never combined with each other; in fact, they are: there
are toll roads with bridges, and very steep roads with embankments, so
probably without a way to deal with multiple rules, thousands of
combinations are necessary).
2. I guess not applying the few lines of the proposed patch related to
symbol levels should have no other effect than disabling symbol levels
(with my patch I can enable or disable symbol levels without problems).
However, with r15217, opening one of my projects or loading a style
(attached [http://trac.osgeo.org/qgis/raw-attachment/ticket/3222/osm_qgis-
rules_r3.zip in this ticket here]) makes qgis crash (tested with line
style). If the style format is incompatible, I would need to recreate my
325 rules/symbols (5 minutes each, that's 27 hours).
Often, it crashes with this message:
{{{
Fatal: ASSERT failure in QVector<T>::operator[]: "index out of range",
file /usr/include/qt4/QtCore/qvector.h, line 343
Abandon (core dumped)
}}}
It even crashes (with the same message) when I open the 'ways' style file
saved without the symbol levels (i.e. style saved after unchecking the
"Use symbol levels" box).
3. "dark background for some columns" removed: Since the columns are often
hidden (by the filter in "group by filter" window or by the scale in the
"group by scale" window), I added the background on even columns (2nd and
4th) to help the user see where the columns are. There are grey lines in
the "Fields" tab, maybe we can use them as well in the "Style" tab instead
of the background?
--
Ticket URL: <http://trac.osgeo.org/qgis/ticket/3222#comment:16>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list