I have a layer which is comprised of a number of different polygons symbolised according to their type.

I have set up a style which successfully filters by type then applies a corresponding fill (in some cases overlays this with a hatch style) and this works great. Now I want to apply the same filters but in some instances apply an external graphic with a transparent background instead of a hatch style.

I have used the sld code found in the Geoserver SLD Cookbook and this works fine on its own but when I try and use it in conjunction with a filter it fails to work.

Has anyone come across this same issue and if so can you help me please?


  • 3
    Please show us your code. – underdark Jan 25 '11 at 14:42

There's an example of using an external graphic to fill a polygon at http://suite.opengeo.org/recipes/#sld/polygon/graphicfill

Basically it's:

                  xlink:href="colorblocks.png" />

Though that's from the SLD cookbook. You can use a url in the xlink:href to refer to a graphic online, and I'm pretty sure it can be transparent. If you post what you've tried then it'll be easier to help, everything should work with filters.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy