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:Format>image/svg+xml</se:Format>
                  </se:ExternalGraphic>
                  *<se:Size>16</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:Format>image/svg+xml</se:Format>
                  </se:ExternalGraphic>
                  *<se:Size>16</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:
[image: Inline images 4]

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:
[image: Inline images 5]

The Y is still correct, but the X is too short.

But if I increase the X to 18, it becomes too long:

[image: Inline images 6]

This seems to make it impossible to actually pattern multiple fills
together neatly.

Am I doing something wrong or is this a bug?

====

Couple of other observations:
(b) - The doc says: "top-bottom,right-left (two values, top and bottom
sharing the same value)", but as you can see above, it seems to actually be
right-left, top-bottom. I've not tried the three and four values to see if
they agree with the docs.

(c) - Using a single symbol, size 16, with a pattern of "5 17", I get this:
[image: Inline images 8]
As you can see, it's cutting off the tree - should it do that? I thought it
was just adding whitespace around it before drawing the next tree. If I
change it to "5 25", then the tree disappears altogether!

Any thoughts on these issues?

Cheers,
Jonathan



On 23 August 2013 15:55, Andrea Aime <[email protected]> wrote:

> On Fri, Aug 23, 2013 at 4:51 PM, Jonathan Moules <
> [email protected]> 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
>
> -------------------------------------------------------
>

-- 
This transmission is intended for the named addressee(s) only and may 
contain sensitive or protectively marked material up to RESTRICTED and 
should be handled accordingly. Unless you are the named addressee (or 
authorised to receive it for the addressee) you may not copy or use it, or 
disclose it to anyone else. If you have received this transmission in error 
please notify the sender immediately. All email traffic sent to or from us, 
including without limitation all GCSX traffic, may be subject to recording 
and/or monitoring in accordance with relevant legislation.

<<image.png>>

<<image.png>>

<<image.png>>

<<image.png>>

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to