Ticket #1347 (closed enhancement: fixed)

Opened 8 years ago

Last modified 6 years ago

WMS GetMap and SVG

Reported by: ivano.picco@… Owned by: mapserverbugs
Priority: high Milestone: 5.0 release
Component: Output-SVG Version: unspecified
Severity: minor Keywords:
Cc: ivanopicco

Description (last modified by dmorissette) (diff)

Hi!
Still workin' on get SVG map, I think it's stable enough to get support on WMS
getmap method. 
I made a patch to do this:

diff -Nru mapserver-4.6.0-beta1/mapoutput.c mapserver-4.6.0-beta2/mapoutput.c
--- mapserver-4.6.0-beta1/mapoutput.c   2005-04-07 19:23:16.000000000 +0200
+++ mapserver-4.6.0-beta2/mapoutput.c   2005-05-11 11:36:25.000000000 +0200
@@ -927,7 +927,8 @@

         if( j == mime_count && map->outputformatlist[i]->driver &&
             (strncasecmp(map->outputformatlist[i]->driver, "GD/", 3)==0 ||
-             strncasecmp(map->outputformatlist[i]->driver, "GDAL/", 5)==0))
+             strncasecmp(map->outputformatlist[i]->driver, "GDAL/", 5)==0 ||
+             strcasecmp(map->outputformatlist[i]->driver, "svg")==0))
             mime_list[mime_count++] = map->outputformatlist[i]->mimetype;
     }

diff -Nru mapserver-4.6.0-beta1/mapwms.c mapserver-4.6.0-beta2/mapwms.c
--- mapserver-4.6.0-beta1/mapwms.c      2005-04-22 17:50:46.000000000 +0200
+++ mapserver-4.6.0-beta2/mapwms.c      2005-05-11 11:36:25.000000000 +0200
@@ -755,7 +755,8 @@

       if( format == NULL ||
           (strncasecmp(format->driver, "GD/", 3) != 0 &&
-           strncasecmp(format->driver, "GDAL/", 4) != 0))
+           strncasecmp(format->driver, "GDAL/", 4) != 0 &&
+           strcasecmp(format->driver, "svg") != 0))
         {
           msSetError(MS_IMGERR,
                    "Unsupported output format (%s).",
@@ -1783,6 +1784,7 @@
 #ifdef USE_GD_WBMP
                       "<WBMP />"
 #endif
+                      "<SVG />"
                       , NULL);
     msWMSPrintRequestCap(nVersion, "Capabilities", script_url_encoded,
"<WMS_XML />", NULL);
     msWMSPrintRequestCap(nVersion, "FeatureInfo", script_url_encoded, "<MIME
/><GML.1 />", NULL);

I Hope it can be usefull.
Nice day,
Ivano

Attachments

SVG-patch Download (1.6 KB) - added by ivano.picco@… 8 years ago.
Build against MapServer 4.6.0

Change History

Changed 8 years ago by ivano.picco@…

  • dependson set to 455

Changed 8 years ago by dmorissette

  • milestone set to 4.8 release
Assefa, can you please check this when you have a chance? Would anything else be
required to support SVG through WMS?

Changed 8 years ago by ivano.picco@…

Build against MapServer 4.6.0

Changed 6 years ago by ivanopicco

  • cc ivanopicco added

Changed 6 years ago by ivanopicco

  • milestone changed from 4.8 release to FUTURE

Changed 6 years ago by dmorissette

  • description modified (diff)

Assefa, this change seems very straightforward. Is it really all that's needed to allow SVG output via WMS? Do you think it would be safe to add this now (before 5.0-beta1)?

Changed 6 years ago by ivanopicco

Hi all, I have renewed this bug simply to point out its presence. I think it can be done better if we could specify the image type supported by our WMS service, maybe with a "WMS_IMAGETYPE" metadata at MAP level in mapfile, something like this:

MAP

... SIZE 550 400 IMAGETYPE PNG24 IMAGECOLOR 255 255 255

WEB

METADATA

"WMS_TITLE" "Example" "WMS_ABSTRACT" "Example Example" "WMS_SRS" "epsg:26591 epsg:32632" "wms_extent" "1492364 4915081 1499498 4926079" "wms_imagetype" "PNG24 GIF SVG KML"

END

END

...

END

Changed 6 years ago by assefa

there is a ticket opened on the last comment  http://trac.osgeo.org/mapserver/ticket/455

My intention is to add svg support for 5.0 and we could rvisit ticket 455 for better support with user control of wms output format

Changed 6 years ago by assefa

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from FUTURE to 5.0 release

SVG is now valid for wms getmap request r6418

Note: See TracTickets for help on using tickets.