[GeoNode-users] GeoNode Layer Style Weather Symbols and Web Links

Toni Schönbuchner toni.schoenbuchner at csgis.de
Sat Jan 19 23:53:10 PST 2019


Hi Julierme,

I don´t think you can access a postgis entity  directly from SLD.
The Point Symbolizer allows external graphics as mark or ressource.
	https://docs.geoserver.org/stable/en/user/styling/sld/reference/pointsymbolizer.html#externalgraphic
Where an external ressource could also be identified as URL.

Means you could add the SVG to your static root or in some other public
directory or even dropbox and use it as symbol. As alternative it should work
to specific a relative path outside of the data dir where tomcat is allowed to read 
from. With second linking to the file gets harder. 

May I ask you why the svg should be stored in the database? – unsure if there
is some better way but for sure you could just create a django view to output
the svg from postgres and use it like this in your sld. 

Cheers,

Toni

> Today's Topics:
> 
>   1. Re: GeoNode Layer Style Weather Symbols and Web	Links
>      (Julierme Pinheiro)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 18 Jan 2019 18:59:40 -0200
> From: Julierme Pinheiro <juliermeopensourcedeveloper at gmail.com>
> To: geonode-users <geonode-users at lists.osgeo.org>
> Subject: Re: [GeoNode-users] GeoNode Layer Style Weather Symbols and
> 	Web	Links
> Message-ID:
> 	<CAKTKyJK9dtC9MX_QHHH+bJvswgBzcC=BPOwodR840KZLPoZ0aA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi GeoNode users,
> 
> Regarding my previous email, looking at GeoServer documentation
> <https://docs.geoserver.org/stable/en/user/styling/sld/extensions/pointsymbols.html#external-graphics>,
> I got the piece of SLD bellow, but burg02.svg is being retrieved from
> $GEOSERVER_DATA_DIR/styles.
> 
> I would like to have:
> 1 - burg02.svg being retrieved from a postgres table;
> 2 - make a webpage link on burg02.svg through the  SLD file
> 
> 
> <PointSymbolizer>
>   <Graphic>
>     <ExternalGraphic>
>       <OnlineResource xlink:type="simple" xlink:href="burg02.svg" />
>       <Format>image/svg+xml</Format>
>     </ExternalGraphic>
>     <Size>20</Size>
>   </Graphic>
> </PointSymbolizer>
> 
> 
> Any hint on that will be very appreciated.
> 
> Kind regards
> 
> Julierme



More information about the geonode-users mailing list