[Qgis-developer] Displacement and SLD's

Andrea Aime andrea.aime at geo-solutions.it
Wed May 8 03:57:15 PDT 2013


On Wed, May 8, 2013 at 12:33 PM, Giuseppe Sucameli <brush.tyler at gmail.com>wrote:

> Andrea (who's implementing it), has noted that displacement alone can't do
>> this, so has proposed a solution which would work, but would require an SLD
>> file different from the one that QGIS 1.8 exported. His proposed solution
>> is:
>> https://jira.codehaus.org/browse/GEOS-5794?focusedCommentId=324800#comment-324800
>>
>>
>
> IMHO the displacement shouldn't be used in that way, as empty space
> between graphics, though the SE1.1 specs doesn't define a proper tag to do
> that... In fact the Graphic->Displacement tag is already used in other
> contexts with the meaning of "distance in pixels from the hot-spot", not as
> space around the graphic symbol neither as offset between neighbour
> graphics.
>

Right, but at the same time, the SE does not say how to use it in
GraphicFill, so one is free to interpret.
For example, GeoServer does not need SE 1.1 gap and InitialGap in graphic
strokes because it uses the dasharray for that, another thing that is
already in the SLD 1.0 spec and that had no proper definition of usage in
combination with graphicstroke (moreover, it's more flexible than the
simple gap syntax, one can create irregular symbol along lines, something
like two circle, space, one circle, space, repeat).


>
>
>> What is the QGIS solution to this? Does it implement it at all from an
>> SLD file?
>>
>
> I would define 2 new tags as GraphicFill tag's children, like it's already
> done in the GraphicStroke tag.
> GraphicStroke has Gap and InitialGap, we should use the same approach.
>

Extending SLD is a minefield, what happens if OGC releases a corrigendum
that adds the same tags, but with a slightly different semantic?
Also, every extension done that way needs modifications to the parsers and
modification to the programming interfaces, something that in
GeoTools/GeoServer is allowed only on the devel series (the one that spawns
a new stable branch every six months)

The way we handle extensions in GeoServer is to use a VendorOptions tag,
which can accomodate key/value pairs, for example, in this case
we could have something like:

<PolygonSymbolizer>
   ...
  <VendorOption key="gapAbove">10</VendorOption>
  <VendorOption key="gapBelow">5</VendorOption>
  <VendorOption key="gapRight">5</VendorOption>
  <VendorOption key="gapLeft">15</VendorOption>
</PolygonSymbolizer>

Cheers
Andrea

-- 
==
GeoServer training in Milan, 6th & 7th June 2013!  Visit
http://geoserver.geo-solutions.it for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

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

-------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130508/2107f6b4/attachment.html>


More information about the Qgis-developer mailing list