[mapserver-commits] r12828 - branches/branch-6-0/mapserver

svn at osgeo.org svn at osgeo.org
Tue Nov 29 10:34:14 EST 2011


Author: schpidi
Date: 2011-11-29 07:34:14 -0800 (Tue, 29 Nov 2011)
New Revision: 12828

Modified:
   branches/branch-6-0/mapserver/HISTORY.TXT
   branches/branch-6-0/mapserver/mapwcs20.c
Log:
Fixing subsetting in WCS 2.0 (#4099) in 6.0 branch

Modified: branches/branch-6-0/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-6-0/mapserver/HISTORY.TXT	2011-11-29 15:32:56 UTC (rev 12827)
+++ branches/branch-6-0/mapserver/HISTORY.TXT	2011-11-29 15:34:14 UTC (rev 12828)
@@ -15,6 +15,8 @@
 Current Version (future 6.0.2, SVN branch-6-0):
 ---------------------------
 
+- Fixed subsetting in WCS 2.0 (#4099)
+
 - Fixed segfault when calling classObj::updateFromString() with SYMBOL (#4062)
 
 - fix rendering offset on thick GD lines (#3962)

Modified: branches/branch-6-0/mapserver/mapwcs20.c
===================================================================
--- branches/branch-6-0/mapserver/mapwcs20.c	2011-11-29 15:32:56 UTC (rev 12827)
+++ branches/branch-6-0/mapserver/mapwcs20.c	2011-11-29 15:34:14 UTC (rev 12828)
@@ -3526,7 +3526,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)
     {
@@ -3548,8 +3555,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];
 
@@ -3713,14 +3719,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