[Geoserver-users] SLD: ExtarnalGraphic does not work

Hi list,
i’m trying to bind an external graphic to use in SLD, but it doesn’t work. Here’s a snippet:

---------------------------------8<----------------------------------------------





GIF

3




---------------------------------8<----------------------------------------------
the bitmap is reacheable for geoserver. I inserted the url http://localhost:9080/geoserver/bitmaps/red_cross.GIF in the browser and got the bitmap back.

The SLD also looks OK. I get no error in the log. Only these areas which are styled with above PolygonSymbolizer are white. ExternalGraphic is surely implemented for PolygonSymbolizer isn’t it?

KR
Albrecht


Albrecht Weiser,
E6, GIS Center

Hessische Zentrale für Datenverarbeitung (HZD)
Mainzer Straße 29, 65185 Wiesbaden
Tel.: 0611 340-3113
Fax: 0611 340-5113
E-Mail: albrecht.weiser-at-hzd.hessen.de

Hi Albrecht,

Which version of GeoServer are you using? I was under the impression that this should work ok in more recent versions.

-Justin

Albrecht.Weiser@anonymised.com wrote:

Hi list,
i'm trying to bind an external graphic to use in SLD, but it doesn't work. Here's a snippet:

---------------------------------8<----------------------------------------------

                                        <PolygonSymbolizer>
                                                <Fill>
                                                        <GraphicFill>
                                                                <Graphic>
                                                                        <ExternalGraphic>
                                                                                <OnlineRessource xmlns:xlink="http://www.w3.org/1999/xlink&quot; xlink:type="simple" xlink:href="http://localhost:9080/geoserver/bitmaps/red_cross.GIF&quot;/&gt;

                                                                                <Format>GIF</Format>
                                                                        </ExternalGraphic>
                                                                        <Size>3</Size>
                                                                </Graphic>
                                                        </GraphicFill>
                                                </Fill>
                                        </PolygonSymbolizer>
---------------------------------8<----------------------------------------------

the bitmap is reacheable for geoserver. I inserted the url ___http://localhost:9080/geoserver/bitmaps/red_cross.GIF_ in the browser and got the bitmap back.

The SLD also looks OK. I get no error in the log. Only these areas which are styled with above PolygonSymbolizer are white. ExternalGraphic is surely implemented for PolygonSymbolizer isn't it?

KR
Albrecht

--
Albrecht Weiser,
E6, GIS Center

Hessische Zentrale für Datenverarbeitung (HZD)
Mainzer Straße 29, 65185 Wiesbaden
Tel.: 0611 340-3113
Fax: 0611 340-5113
E-Mail: albrecht.weiser-at-hzd.hessen.de

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
Software Engineer, OpenGeo
http://opengeo.org

Albrecht.Weiser@anonymised.com ha scritto:

Hi list,
i'm trying to bind an external graphic to use in SLD, but it doesn't work. Here's a snippet:

---------------------------------8<----------------------------------------------

                                        <PolygonSymbolizer>
                                                <Fill>
                                                        <GraphicFill>
                                                                <Graphic>
                                                                        <ExternalGraphic>
                                                                                <OnlineRessource xmlns:xlink="http://www.w3.org/1999/xlink&quot; xlink:type="simple" xlink:href="http://localhost:9080/geoserver/bitmaps/red_cross.GIF&quot;/&gt;

                                                                                <Format>GIF</Format>
                                                                        </ExternalGraphic>
                                                                        <Size>3</Size>
                                                                </Graphic>
                                                        </GraphicFill>
                                                </Fill>
                                        </PolygonSymbolizer>
---------------------------------8<----------------------------------------------

the bitmap is reacheable for geoserver. I inserted the url ___http://localhost:9080/geoserver/bitmaps/red_cross.GIF_ in the browser and got the bitmap back.

The SLD also looks OK. I get no error in the log. Only these areas which are styled with above PolygonSymbolizer are white. ExternalGraphic is surely implemented for PolygonSymbolizer isn't it?

Hum, yes, but nothing is able to support the mime type "GIF". Try with
"image/gif", you should have better chance.

Cheers
Andrea

Yep, you're right, that was wrong. Unfortunately it seemed not to be the origin of the problem. I also tried to place the bitmap somewhere else on an apache web-directory; i tried with png instead of gif - nothing worked.
I'm helpless :o/
Best wishes
Albrecht

-----Ursprüngliche Nachricht-----
Von: Andrea Aime [mailto:aaime@anonymised.com]
Gesendet: Dienstag, 12. August 2008 15:12
An: Weiser, Albrecht (HZD)
Cc: geoserver-users@lists.sourceforge.net
Betreff: Re: [Geoserver-users] SLD: ExtarnalGraphic does not work

Albrecht.Weiser@anonymised.com ha scritto:
> Hi list,
> i'm trying to bind an external graphic to use in SLD, but
it doesn't
> work. Here's a snippet:
>
>
---------------------------------8<---------------------------
-------------------
>
> <PolygonSymbolizer>
> <Fill>
>
<GraphicFill>
>
    <Graphic>
>
            
> <ExternalGraphic>
>
            
> <OnlineRessource xmlns:xlink="http://www.w3.org/1999/xlink&quot;
> xlink:type="simple"
> xlink:href="http://localhost:9080/geoserver/bitmaps/red_cross.GIF&quot;/&gt;
>
>
            
> <Format>GIF</Format>
>
            
> </ExternalGraphic>
>
            
> <Size>3</Size>
>
    </Graphic>
>
</GraphicFill>
> </Fill>
> </PolygonSymbolizer>
>
---------------------------------8<---------------------------
-------------------
>
> the bitmap is reacheable for geoserver. I inserted the url
> ___http://localhost:9080/geoserver/bitmaps/red_cross.GIF_
in the browser
> and got the bitmap back.
>
> The SLD also looks OK. I get no error in the log. Only
these areas which
> are styled with above PolygonSymbolizer are white.
ExternalGraphic is
> surely implemented for PolygonSymbolizer isn't it?

Hum, yes, but nothing is able to support the mime type "GIF". Try with
"image/gif", you should have better chance.

Cheers
Andrea

Albrecht, I think you simply have a typo:

OnlineRessource - too many "s" in there - should be OnlineResource

Also, I've found that the value of Size should match the value of the
image's height for best results.
Otherwise, it can get stretched or squished or be too small. You might want
to check that just in case.

I have some working examples at these URLs if you're interested:

http://lyceum.massgis.state.ma.us/wiki/doku.php?id=wms:sld:polygon_example_diagonal_graphic&s=sld
http://lyceum.massgis.state.ma.us/wiki/doku.php?id=wms:sld:polygon_example_fill_graphics
http://lyceum.massgis.state.ma.us/wiki/doku.php?id=wms:sld:polygon_example_trans_graphic
--
View this message in context: http://www.nabble.com/SLD%3A-ExtarnalGraphic-does-not-work-tp18927405p18946078.html
Sent from the GeoServer - User mailing list archive at Nabble.com.