[mapserver-commits] r13289 - in branches/branch-6-0: mapserver msautotest/wxs/expected

svn at osgeo.org svn at osgeo.org
Tue Mar 20 12:31:55 EDT 2012


Author: schpidi
Date: 2012-03-20 09:31:55 -0700 (Tue, 20 Mar 2012)
New Revision: 13289

Modified:
   branches/branch-6-0/mapserver/mapwcs20.c
   branches/branch-6-0/msautotest/wxs/expected/wcs_20_desc_bands.xml
   branches/branch-6-0/msautotest/wxs/expected/wcs_20_getcov_bands_name.dat
   branches/branch-6-0/msautotest/wxs/expected/wcs_20_getcov_bands_name_new.dat
   branches/branch-6-0/msautotest/wxs/expected/wcs_20_post_bands_name.dat
   branches/branch-6-0/msautotest/wxs/expected/wcs_20_post_bands_name_new.dat
Log:
Adjusting axis order in offsetVector (#4191).


Modified: branches/branch-6-0/mapserver/mapwcs20.c
===================================================================
--- branches/branch-6-0/mapserver/mapwcs20.c	2012-03-20 16:24:18 UTC (rev 13288)
+++ branches/branch-6-0/mapserver/mapwcs20.c	2012-03-20 16:31:55 UTC (rev 13289)
@@ -1778,18 +1778,20 @@
 
                 psPos = xmlNewChild(psOrigin, psGmlNs, BAD_CAST "pos", BAD_CAST point);
             }
-            snprintf(resx, sizeof(resx), "%f 0", cm->xresolution);
-            snprintf(resy, sizeof(resy), "0 %f", -fabs(cm->yresolution));
+
             if (swapAxes == MS_FALSE)
             {
-                psOffsetX = xmlNewChild(psGrid, psGmlNs, BAD_CAST "offsetVector", BAD_CAST resx);
-                psOffsetY = xmlNewChild(psGrid, psGmlNs, BAD_CAST "offsetVector", BAD_CAST resy);
+                snprintf(resx, sizeof(resx), "%f 0", cm->xresolution);
+                snprintf(resy, sizeof(resy), "0 %f", -fabs(cm->yresolution));
             }
             else
             {
-                psOffsetY = xmlNewChild(psGrid, psGmlNs, BAD_CAST "offsetVector", BAD_CAST resy);
-                psOffsetX = xmlNewChild(psGrid, psGmlNs, BAD_CAST "offsetVector", BAD_CAST resx);
+                snprintf(resx, sizeof(resx), "0 %f", cm->xresolution);
+                snprintf(resy, sizeof(resy), "%f 0", -fabs(cm->yresolution));
             }
+            psOffsetX = xmlNewChild(psGrid, psGmlNs, BAD_CAST "offsetVector", BAD_CAST resx);
+            psOffsetY = xmlNewChild(psGrid, psGmlNs, BAD_CAST "offsetVector", BAD_CAST resy);
+
             xmlNewProp(psOffsetX, BAD_CAST "srsName", BAD_CAST cm->srs_uri);
             xmlNewProp(psOffsetY, BAD_CAST "srsName", BAD_CAST cm->srs_uri);
         }
@@ -3802,6 +3804,10 @@
             msProjectRect(&(map->projection), &outputProj, &bbox);
             msFreeProjection(&(map->projection));
             map->projection = outputProj;
+
+            /* recalculate resolutions, needed if UOM changes (e.g: deg -> m) */
+            params->resolutionX = (bbox.maxx - bbox.minx) / params->width;
+            params->resolutionY = (bbox.maxy - bbox.miny) / params->height;
         }
     }
 

Modified: branches/branch-6-0/msautotest/wxs/expected/wcs_20_desc_bands.xml
===================================================================
--- branches/branch-6-0/msautotest/wxs/expected/wcs_20_desc_bands.xml	2012-03-20 16:24:18 UTC (rev 13288)
+++ branches/branch-6-0/msautotest/wxs/expected/wcs_20_desc_bands.xml	2012-03-20 16:31:55 UTC (rev 13289)
@@ -22,8 +22,8 @@
             <gml:pos>49.891143 14.470271</gml:pos>
           </gml:Point>
         </gml:origin>
-        <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 -0.033972</gml:offsetVector>
-        <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0.033722 0</gml:offsetVector>
+        <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 0.033722</gml:offsetVector>
+        <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">-0.033972 0</gml:offsetVector>
       </gml:RectifiedGrid>
     </gml:domainSet>
     <gmlcov:rangeType>
@@ -216,8 +216,8 @@
             <gml:pos>49.891143 14.470271</gml:pos>
           </gml:Point>
         </gml:origin>
-        <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 -0.033972</gml:offsetVector>
-        <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0.033722 0</gml:offsetVector>
+        <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 0.033722</gml:offsetVector>
+        <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">-0.033972 0</gml:offsetVector>
       </gml:RectifiedGrid>
     </gml:domainSet>
     <gmlcov:rangeType>

Modified: branches/branch-6-0/msautotest/wxs/expected/wcs_20_getcov_bands_name.dat
===================================================================
--- branches/branch-6-0/msautotest/wxs/expected/wcs_20_getcov_bands_name.dat	2012-03-20 16:24:18 UTC (rev 13288)
+++ branches/branch-6-0/msautotest/wxs/expected/wcs_20_getcov_bands_name.dat	2012-03-20 16:31:55 UTC (rev 13289)
@@ -23,8 +23,8 @@
           <gml:pos>49.891143 14.470271</gml:pos>
         </gml:Point>
       </gml:origin>
-      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 -0.033972</gml:offsetVector>
-      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0.033722 0</gml:offsetVector>
+      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 0.033722</gml:offsetVector>
+      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">-0.033972 0</gml:offsetVector>
     </gml:RectifiedGrid>
   </gml:domainSet>
   <gml:rangeSet>

Modified: branches/branch-6-0/msautotest/wxs/expected/wcs_20_getcov_bands_name_new.dat
===================================================================
--- branches/branch-6-0/msautotest/wxs/expected/wcs_20_getcov_bands_name_new.dat	2012-03-20 16:24:18 UTC (rev 13288)
+++ branches/branch-6-0/msautotest/wxs/expected/wcs_20_getcov_bands_name_new.dat	2012-03-20 16:31:55 UTC (rev 13289)
@@ -23,8 +23,8 @@
           <gml:pos>49.891143 14.470271</gml:pos>
         </gml:Point>
       </gml:origin>
-      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 -0.033972</gml:offsetVector>
-      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0.033722 0</gml:offsetVector>
+      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 0.033722</gml:offsetVector>
+      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">-0.033972 0</gml:offsetVector>
     </gml:RectifiedGrid>
   </gml:domainSet>
   <gml:rangeSet>

Modified: branches/branch-6-0/msautotest/wxs/expected/wcs_20_post_bands_name.dat
===================================================================
--- branches/branch-6-0/msautotest/wxs/expected/wcs_20_post_bands_name.dat	2012-03-20 16:24:18 UTC (rev 13288)
+++ branches/branch-6-0/msautotest/wxs/expected/wcs_20_post_bands_name.dat	2012-03-20 16:31:55 UTC (rev 13289)
@@ -23,8 +23,8 @@
           <gml:pos>49.891143 14.470271</gml:pos>
         </gml:Point>
       </gml:origin>
-      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 -0.033972</gml:offsetVector>
-      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0.033722 0</gml:offsetVector>
+      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 0.033722</gml:offsetVector>
+      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">-0.033972 0</gml:offsetVector>
     </gml:RectifiedGrid>
   </gml:domainSet>
   <gml:rangeSet>

Modified: branches/branch-6-0/msautotest/wxs/expected/wcs_20_post_bands_name_new.dat
===================================================================
--- branches/branch-6-0/msautotest/wxs/expected/wcs_20_post_bands_name_new.dat	2012-03-20 16:24:18 UTC (rev 13288)
+++ branches/branch-6-0/msautotest/wxs/expected/wcs_20_post_bands_name_new.dat	2012-03-20 16:31:55 UTC (rev 13289)
@@ -23,8 +23,8 @@
           <gml:pos>49.891143 14.470271</gml:pos>
         </gml:Point>
       </gml:origin>
-      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 -0.033972</gml:offsetVector>
-      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0.033722 0</gml:offsetVector>
+      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">0 0.033722</gml:offsetVector>
+      <gml:offsetVector srsName="http://www.opengis.net/def/crs/EPSG/0/4326">-0.033972 0</gml:offsetVector>
     </gml:RectifiedGrid>
   </gml:domainSet>
   <gml:rangeSet>



More information about the mapserver-commits mailing list