[mapserver-commits] r12827 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Nov 29 10:32:56 EST 2011


Author: schpidi
Date: 2011-11-29 07:32:56 -0800 (Tue, 29 Nov 2011)
New Revision: 12827

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapwcs20.c
Log:
Fixing subsetting in WCS 2.0 (#4099)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-11-29 15:26:06 UTC (rev 12826)
+++ trunk/mapserver/HISTORY.TXT	2011-11-29 15:32:56 UTC (rev 12827)
@@ -14,6 +14,8 @@
 
 Current Version (SVN trunk, 6.1-dev, future 6.2): 
 -------------------------------------------------
+- Fixed subsetting in WCS 2.0 (#4099)
+
 - Upgrade clipper library to 4.6.3
 
 - Make openlayers wms template request images with mimetype of outputformat

Modified: trunk/mapserver/mapwcs20.c
===================================================================
--- trunk/mapserver/mapwcs20.c	2011-11-29 15:26:06 UTC (rev 12826)
+++ trunk/mapserver/mapwcs20.c	2011-11-29 15:32:56 UTC (rev 12827)
@@ -3440,7 +3440,14 @@
     /************************************************************************/
 
     msInitProjection(&imageProj);
-    msLoadProjectionString(&imageProj, cm.srs);
+    if (msLoadProjectionString(&imageProj, cm.srs) == -1)
+    {
+        msSetError(MS_WCSERR,
+            "Error loading CRS %s.",
+            "msWCSGetCoverage20()", params->subsetcrs);
+        return msWCSException(map, "InvalidParameterValue",
+            "projection", params->version);
+    }
 
     if(msWCSGetCoverage20_FinalizeParamsObj(params) == MS_FAILURE)
     {
@@ -3462,8 +3469,7 @@
             x_1 = cm.geotransform[0]
                 + orig_bbox.minx * cm.geotransform[1]
                 + orig_bbox.miny * cm.geotransform[2];
-            x_2 =
-                    cm.geotransform[0]
+            x_2 = cm.geotransform[0]
                 + (orig_bbox.maxx+1) * cm.geotransform[1]
                 + (orig_bbox.maxy+1) * cm.geotransform[2];
 
@@ -3627,14 +3633,16 @@
     }
 
     /* set the bounding box as new map extent */
-    map->extent = layer->extent = bbox;
+    map->extent = bbox;
     map->width = params->width;
     map->height = params->height;
 
     /* Are we exceeding the MAXSIZE limit on result size? */
     if(map->width > map->maxsize || map->height > map->maxsize )
     {
-        msSetError(MS_WCSERR, "Raster size out of range, width and height of resulting coverage must be no more than MAXSIZE=%d.", "msWCSGetCoverage20()", map->maxsize);
+        msSetError(MS_WCSERR, "Raster size out of range, width and height of "
+                              "resulting coverage must be no more than MAXSIZE=%d.",
+                              "msWCSGetCoverage20()", map->maxsize);
 
         return msWCSException(map, "InvalidParameterValue", 
                                    "size", params->version);



More information about the mapserver-commits mailing list