2

Can I use relative path in the SLD 1.1.0? When validating it in geoserver, it said

Parsing failed for ExternalGraphic: java.lang.IllegalArgumentException: URI is not absolute

SLD:

<se:PointSymbolizer>
      <se:Graphic>
       <se:ExternalGraphic>
         <se:OnlineResource xlink:type="simple" xlink:href="images/mrtstation.png"/>
        <se:Format>image/png</se:Format>
       </se:ExternalGraphic>
       <se:Size>4</se:Size>
      </se:Graphic>
</se:PointSymbolizer>
  • That should work (it's relative to the styles directory) - try with ./ on the front. – Ian Turton Sep 30 '14 at 7:48
  • Try Ian's suggestion, but it may well not be working, the SLD 1.1 parser is an entirely different code base (and not as complete and well maintained as the SLD 1.0 one) – Andrea Aime Sep 30 '14 at 8:14
  • Documentation shows an example about the syntax docs.geoserver.org/stable/en/user/styling/sld-extensions/… – user30184 Sep 30 '14 at 10:47
1

Please take a look at my answer here.

In a nutshell, relative paths do not work. Use URL paths.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.