AW: [Qgis-developer] new generation symbology

Hugentobler Marco marco.hugentobler at karto.baug.ethz.ch
Thu Jan 22 02:54:43 EST 2009


Hi Martin,

Perfect. I also think it is a good idea to draw decorations as symbol layers.

Regards,
Marco


-----Ursprüngliche Nachricht-----
Von: Martin Dobias [mailto:wonder.sk at gmail.com]
Gesendet: Mi 21.01.2009 17:21
An: Hugentobler  Marco
Cc: qgis-dev
Betreff: Re: [Qgis-developer] new generation symbology
 
On Wed, Jan 21, 2009 at 4:27 PM, Hugentobler  Marco
<marco.hugentobler at karto.baug.ethz.ch> wrote:
>>I'm asking that with KISS principle in mind: unnecessary complexity
>>should be avoided. Adding support for additional decorators might lead
>>to more complex code, more complex GUI and new bugs...
>
> Go to a vector drawing program, say inkscape. Draw a line and go to 'stroke style'. You'll find about 50 types as 'begin markers', 'middle markers' and 'end markers'. I think it would make the class LineSymbol very hard to read if all of those would be hard coded the same way as the _draw_arrow function is now.
> And there are more possible decorators for special purposes. Think of cold front and warm front symbols in meteorology. Or another one would be middle markers in certain distance interval (so not at the edge points).
> But you might also keep the arrows hardcoded as they are now and additional ones could be added as decorators (e.g. by third party people with special purpose applications).

Thanks for pointing me to Inkscape's stroke style options! It gave me
some additional insight of the possible decorators. This leads me to
an idea to draw arrows (and/or other decorations) as a symbol layer.
There is already MarkerLineSymbolLayer which draws markers along the
line - basically it has the same meaning as "middle markers" in
Inkscape. So you're able to draw cold and warm fronts in case you
provide necessary symbols - see my test:
http://www.mapserver.sk/~wonder/qgis/symbology-ng-meteo.png

The implementation of line decorators then could be done in two possible ways:
- option in marker line symbol layer telling whether it should act as
begin/end or middle marker
- new line symbol layer that draws exclusively (user-selectable)
decorations at the begin and/or end of the line.
These options should eliminate additional core code complexity.

Regards
Martin



More information about the Qgis-developer mailing list