Hi,
working on the QGIS SLD exported I've found one cool feature based on
existing standards,
that is, the ability to parametrize SVGs colors, line thicknesses and the
like.

The QGIS library of SVGs contains seems to be all black at a first glance,
e.g.:
https://github.com/qgis/QGIS/blob/master/images/svg/food/food_cafe.svg
but looking at the sources you'll find the use of the "param" function,
e.g.:
https://raw.githubusercontent.com/qgis/QGIS/master/images/svg/food/food_cafe.svg

In particular:

<path fill="param(fill)" fill-opacity="param(fill-opacity)"
stroke="param(outline)" stroke-opacity="param(outline-opacity)"
stroke-width="param(outline-width)" ...

This comes from an official SVG extension _draft_ found here:
https://www.w3.org/TR/SVGParamPrimer/

The QGis UI allows to control said parameters and get out a colored symbol,
all in all similar to our mark support (which QGis also
has, but it's under the "simple symbol" category):

[image: Inline image 1]

I'm suggesting we implement the same, it adds a significant improvement and
would allow
to use the extensive SVG symbol set already provided in QGIS.
Mind, this is a bit more flexible than marks, in that one could
parameterize certain parts and not
others, or have two outline colors for two semantically different types of
outline, and so on, thus
I'm not proposing to go and create a mark factory for it. It is also to be
noted that the parametrization
of SVGs in QGis has been growing over time, so leveraging the exact same
mechanism will make it
easier to stay on par.

Syntax wise, I have been torn a bit between adding vendor params and using
the URL params:
https://www.w3.org/TR/SVGParamPrimer/#URLParameters

After a bit of thinking, I propose to use URL params, as they are local to
the symbol, while vendor params
are currently at the symbolizer level, too far up in the containment
hierarchy (a complex symbol could contain
more than one SVG reference), adding them to Graphic would be possible, but
also an API break.

Of course, I would then modify the QGis export to use the params so that
style exports preserve
the graphics characteristics chosen.

Cheers
Andrea

-- 
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.



The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility  for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------
------------------------------------------------------------------------------
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to