<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear Jorge and Toni,</div><div><br></div><div>Thank you very much for your reply.  <br></div><div><br></div><div>I have a table (db_brasilia_weather) in postgis. The table db_brasilia_weather has two attributes: weather and url_image. weather attribute has integer values of weather status and url_image attribute: the path for the weather images cloudy.svg, thunder.svg, sunny.svg, rainy.svg.</div><div><br></div><div>db_brasilia_weather</div><div><br></div><div>id     weather      url_image</div><div>1          0             sunny.svg<br></div><div>2          5             thunder.svg</div><div>3          1             rainy.svg</div><div><br></div><div>*.svg images are stored in  /webapps/geoserver/data/styles</div><div><br></div><div>Based on the information, Creating Point Styles in [1] and Item 3.4.2 about Graphic in [2], I created the following CSS (geonode.css) file:</div><div><br></div><div>* {<br>  mark: symbol('circle');<br>  mark-size: 5;<br>}<br><br>:mark {<br>  fill: cyan;<br>  stroke: darkblue;<br>}<br><br>[weather = 0] {<br>  mark: url(./geoserver/data/styles/sunny.svg);<br>  mark-mime: "image/svg";<br>  mark-size: 100;<br>}<br></div><div>I have tried mark: url(sunny.svg), url("./geoserver/data/styles/sunny.svg"), but none of these configuration have been successful.</div><div><br></div><div>Any additional comment on this matter will be very appreciated.</div><div><br></div><div>Thank you very much for your time in advance.</div><div><br></div><div>Kind Regards</div><div><br></div><div>Julierme<br></div><div><br></div><div><br></div><div>[1] <a href="http://docs.geonode.org/en/master/tutorials/advanced/adv_data_mgmt/pretty_maps/css.html#creating-point-styles">http://docs.geonode.org/en/master/tutorials/advanced/adv_data_mgmt/pretty_maps/css.html#creating-point-styles</a><br></div><div>[2] <a href="https://docs.geoserver.org/stable/en/user/styling/workshop/css/point.html">https://docs.geoserver.org/stable/en/user/styling/workshop/css/point.html</a></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail-m_-883359080895201821gmail_attr">On Sun, Jan 20, 2019 at 5:53 AM Toni Schönbuchner <<a href="mailto:toni.schoenbuchner@csgis.de" target="_blank">toni.schoenbuchner@csgis.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Julierme,<br>
<br>
I don´t think you can access a postgis entity  directly from SLD.<br>
The Point Symbolizer allows external graphics as mark or ressource.<br>
        <a href="https://docs.geoserver.org/stable/en/user/styling/sld/reference/pointsymbolizer.html#externalgraphic" rel="noreferrer" target="_blank">https://docs.geoserver.org/stable/en/user/styling/sld/reference/pointsymbolizer.html#externalgraphic</a><br>
Where an external ressource could also be identified as URL.<br>
<br>
Means you could add the SVG to your static root or in some other public<br>
directory or even dropbox and use it as symbol. As alternative it should work<br>
to specific a relative path outside of the data dir where tomcat is allowed to read <br>
from. With second linking to the file gets harder. <br>
<br>
May I ask you why the svg should be stored in the database? – unsure if there<br>
is some better way but for sure you could just create a django view to output<br>
the svg from postgres and use it like this in your sld. <br>
<br>
Cheers,<br>
<br>
Toni<br>
<br>
> Today's Topics:<br>
> <br>
>   1. Re: GeoNode Layer Style Weather Symbols and Web  Links<br>
>      (Julierme Pinheiro)<br>
> <br>
> <br>
> ----------------------------------------------------------------------<br>
> <br>
> Message: 1<br>
> Date: Fri, 18 Jan 2019 18:59:40 -0200<br>
> From: Julierme Pinheiro <<a href="mailto:juliermeopensourcedeveloper@gmail.com" target="_blank">juliermeopensourcedeveloper@gmail.com</a>><br>
> To: geonode-users <<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a>><br>
> Subject: Re: [GeoNode-users] GeoNode Layer Style Weather Symbols and<br>
>       Web     Links<br>
> Message-ID:<br>
>       <CAKTKyJK9dtC9MX_QHHH+bJvswgBzcC=<a href="mailto:BPOwodR840KZLPoZ0aA@mail.gmail.com" target="_blank">BPOwodR840KZLPoZ0aA@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
> <br>
> Hi GeoNode users,<br>
> <br>
> Regarding my previous email, looking at GeoServer documentation<br>
> <<a href="https://docs.geoserver.org/stable/en/user/styling/sld/extensions/pointsymbols.html#external-graphics" rel="noreferrer" target="_blank">https://docs.geoserver.org/stable/en/user/styling/sld/extensions/pointsymbols.html#external-graphics</a>>,<br>
> I got the piece of SLD bellow, but burg02.svg is being retrieved from<br>
> $GEOSERVER_DATA_DIR/styles.<br>
> <br>
> I would like to have:<br>
> 1 - burg02.svg being retrieved from a postgres table;<br>
> 2 - make a webpage link on burg02.svg through the  SLD file<br>
> <br>
> <br>
> <PointSymbolizer><br>
>   <Graphic><br>
>     <ExternalGraphic><br>
>       <OnlineResource xlink:type="simple" xlink:href="burg02.svg" /><br>
>       <Format>image/svg+xml</Format><br>
>     </ExternalGraphic><br>
>     <Size>20</Size><br>
>   </Graphic><br>
> </PointSymbolizer><br>
> <br>
> <br>
> Any hint on that will be very appreciated.<br>
> <br>
> Kind regards<br>
> <br>
> Julierme<br>
<br>
</blockquote></div>