[mapserver-commits] r9246 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Aug 10 18:08:43 EDT 2009


Author: tamas
Date: 2009-08-10 18:08:42 -0400 (Mon, 10 Aug 2009)
New Revision: 9246

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapmssql2008.c
Log:
Fixed msMSSQL2008LayerGetShape to retrieve proper wkb geometries (#3082)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-08-10 22:07:08 UTC (rev 9245)
+++ trunk/mapserver/HISTORY.TXT	2009-08-10 22:08:42 UTC (rev 9246)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Fixed msMSSQL2008LayerGetShape to retrieve proper wkb geometries (#3082)
+
 - Fixed the shape index for the inline layers (#3074)
 
 - Fixed MINDISTANCE not considering label size on lines (#3050)

Modified: trunk/mapserver/mapmssql2008.c
===================================================================
--- trunk/mapserver/mapmssql2008.c	2009-08-10 22:07:08 UTC (rev 9245)
+++ trunk/mapserver/mapmssql2008.c	2009-08-10 22:08:42 UTC (rev 9246)
@@ -1436,7 +1436,7 @@
 
     if(layer->numitems == 0) 
     {
-        snprintf(buffer, sizeof(buffer), "%s", layerinfo->geom_column);
+        snprintf(buffer, sizeof(buffer), "%s.STAsBinary()", layerinfo->geom_column);
         columns_wanted = _strdup(buffer);
     } 
     else 
@@ -1445,7 +1445,7 @@
             snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "convert(varchar(max), %s),", layer->items[t]);
         }
 
-        snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "%s", layerinfo->geom_column);
+        snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "%s.STAsBinary()", layerinfo->geom_column);
 
         columns_wanted = _strdup(buffer);
     }



More information about the mapserver-commits mailing list