[mapserver-dev] Problem in mapscript: from SLD to map ExternalGraphic SVG not supported

Luigi Pirelli luigi.pirelli at faunalia.it
Tue Jan 7 10:58:24 PST 2014


I've to show a problem using mapscript... I'm using mapscript creating map
file starting form a SLD (calling applySLD) generated by QGIS
(rt_mapserver_exporter plugin)

a SLD file can be found here: https://gist.github.com/luipir/8304386

it has been generated creating a simple point shape file and applying
external SVG files in QGIS... I can provide all test files and qgis project
and qml style

None of external SVGs are exported in the map file... reading the mapscript
code i can see:

mapogcsld.c:2075 msSLDParseExternalGraphic(...)
manage external link only if mapserver is compiled with CURL (cmake default
is NO)
if CURL is available then it manage only this formats:

      (strcasecmp(pszFormat, "GIF") == 0 ||
       strcasecmp(pszFormat, "image/gif") == 0 ||
       strcasecmp(pszFormat, "PNG") == 0 ||
       strcasecmp(pszFormat, "image/png") == 0)) {

then call msAddImageSymbol
and mapsymbol.c:364 - msAddImageSymbol

manage only http

If I try to "force" it strcasecmp(pszFormat, "image/svg+xml") == 0
in msSLDParseExternalGraphic
and strncasecmp(filename, "file", 4) == 0 in msAddImageSymbol

the call msHTTPGetFile return this error message:

MapServerError?: msHTTPExecuteRequests(): HTTP request error. HTTP: request
failed with curl error code 1 (Protocol file not supported or disabled in
libcurl) for file:///Antica-dir-scorr-fluv-2020.svg

but CURL manage file:/// protocol... I can download it (adding complete

so the QUESTION is

1) there is a reason that svg and file: protocol are not implemented?
2) if it's a "bug" what whould be a good solution?

thank you for your help

Luigi Pirelli (luigi.pirelli at faunalia.it - luipir at gmail.com)

p.s. i'm using 6.4 master code
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20140107/c95cd2d9/attachment.html>

More information about the mapserver-dev mailing list