[mapserver-commits] r11575 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Apr 14 10:18:31 EDT 2011


Author: assefa
Date: 2011-04-14 07:18:31 -0700 (Thu, 14 Apr 2011)
New Revision: 11575

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapkmlrenderer.cpp
Log:
latlon bbox for raster layers could end up being wrong for non-square requests (#3840)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-04-13 23:33:15 UTC (rev 11574)
+++ trunk/mapserver/HISTORY.TXT	2011-04-14 14:18:31 UTC (rev 11575)
@@ -15,7 +15,7 @@
 Current Version (SVN trunk): 
 ---------------------------- 
 
-- ...
+- KML: latlon bbox for raster layers could end up being wrong for non-square requests (#3840)
 
 Version 6.0.0-beta6 (2011-04-13)
 --------------------------------

Modified: trunk/mapserver/mapkmlrenderer.cpp
===================================================================
--- trunk/mapserver/mapkmlrenderer.cpp	2011-04-13 23:33:15 UTC (rev 11574)
+++ trunk/mapserver/mapkmlrenderer.cpp	2011-04-14 14:18:31 UTC (rev 11575)
@@ -903,17 +903,23 @@
     }
 
     char crdStr[64];
+    rectObj mapextent;
+    if (map->gt.need_geotransform == MS_TRUE)
+      mapextent = currentLayer->map->saved_extent;
+    else
+      mapextent = currentLayer->map->extent;
+
     xmlNodePtr latLonBoxNode = xmlNewChild(groundOverlayNode, NULL, BAD_CAST "LatLonBox", NULL);
-    sprintf(crdStr, "%.8f", currentLayer->map->extent.maxy);
+    sprintf(crdStr, "%.8f", mapextent.maxy);
     xmlNewChild(latLonBoxNode, NULL, BAD_CAST "north", BAD_CAST crdStr);
 
-    sprintf(crdStr, "%.8f", currentLayer->map->extent.miny);
+    sprintf(crdStr, "%.8f", mapextent.miny);
     xmlNewChild(latLonBoxNode, NULL, BAD_CAST "south", BAD_CAST crdStr);
 
-    sprintf(crdStr, "%.8f", currentLayer->map->extent.minx);
+    sprintf(crdStr, "%.8f", mapextent.minx);
     xmlNewChild(latLonBoxNode, NULL, BAD_CAST "west", BAD_CAST crdStr);
 
-    sprintf(crdStr, "%.8f", currentLayer->map->extent.maxx);
+    sprintf(crdStr, "%.8f", mapextent.maxx);
     xmlNewChild(latLonBoxNode, NULL, BAD_CAST "east", BAD_CAST crdStr);
 
     xmlNewChild(latLonBoxNode, NULL, BAD_CAST "rotation", BAD_CAST "0.0");



More information about the mapserver-commits mailing list