Hi Andrea,
I’m now dabbling with the SLD Vendor Option - “graphic-margin” and have encountered an issue; before I file a JIRA for it as a bug I wanted to confirm if it’s desired or unintended.
My graphic-fills are SVG symbols of different sizes.
My SLD is:
se:PolygonSymbolizer
se:Fill
se:GraphicFill
se:Graphic
se:ExternalGraphic
<se:OnlineResource xlink:type=“simple” xlink:href=“file:///d:/GeoServer_Symbology/OSMM_SVG_symbols/smallConiferousTreeFillSymbol.svg”/>
se:Formatimage/svg+xml</se:Format>
</se:ExternalGraphic>
se:Size16</se:Size>
</se:Graphic>
</se:GraphicFill>
</se:Fill>
<se:VendorOption name=“graphic-margin”>15</se:VendorOption>
</se:PolygonSymbolizer>
se:PolygonSymbolizer
se:Fill
se:GraphicFill
se:Graphic
se:ExternalGraphic
<se:OnlineResource xlink:type=“simple” xlink:href=“file:///d:/GeoServer_Symbology/OSMM_SVG_symbols/scrubFillSymbol.svg”/>
se:Formatimage/svg+xml</se:Format>
</se:ExternalGraphic>
se:Size16</se:Size>
</se:Graphic>
</se:GraphicFill>
</se:Fill>
<se:VendorOption name=“graphic-margin”>15</se:VendorOption>
</se:PolygonSymbolizer>
As you can see I’m using the same numbers for both items; However the output is:
The scrub pattern isn’t neatly gridded on the X axis because the scrub SVG isn’t as wide as the tree.
I know it’s possible to set specific margins, but that doesn’t help. For instance, if I change the scrub line to:
<se:VendorOption name=“graphic-margin”>17 15</se:VendorOption>
That gives:
The Y is still correct, but the X is too short.
But if I increase the X to 18, it becomes too long:
This seems to make it impossible to actually pattern multiple fills together neatly.
Am I doing something wrong or is this a bug?
···
Cheers,
Jonathan
On 23 August 2013 15:55, Andrea Aime <andrea.aime@anonymised.com> wrote:
On Fri, Aug 23, 2013 at 4:51 PM, Jonathan Moules <jonathanmoules@anonymised.com> wrote:
Thanks. We’re using 2.3.5 so should be fine.
Is there any documentation on it? I can’t seem to find anything.
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/margins.html
Cheers
Andrea
–
==
Our support, Your Success! Visit http://opensdi.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