[mapserver-commits] r11368 - branches/branch-5-6/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Mar 29 16:28:38 EDT 2011
Author: assefa
Date: 2011-03-29 13:28:38 -0700 (Tue, 29 Mar 2011)
New Revision: 11368
Modified:
branches/branch-5-6/mapserver/HISTORY.TXT
branches/branch-5-6/mapserver/mapogcfilter.c
Log:
add support for gml:Box for spatial filters (#3789)
Modified: branches/branch-5-6/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-6/mapserver/HISTORY.TXT 2011-03-29 20:28:13 UTC (rev 11367)
+++ branches/branch-5-6/mapserver/HISTORY.TXT 2011-03-29 20:28:38 UTC (rev 11368)
@@ -13,6 +13,9 @@
Version 5.6.7 (SVN branch-5-6):
---------------------------
+
+- add support for gml:Box for spatial filters (#3789)
+
- Fixed false computation of symbol size when used as a brush on line (#3760)
- Fixed SQL Spatial to be able to use UniqueIdentifier field as unique key (#3722)
Modified: branches/branch-5-6/mapserver/mapogcfilter.c
===================================================================
--- branches/branch-5-6/mapserver/mapogcfilter.c 2011-03-29 20:28:13 UTC (rev 11367)
+++ branches/branch-5-6/mapserver/mapogcfilter.c 2011-03-29 20:28:38 UTC (rev 11368)
@@ -101,8 +101,15 @@
if (hGeometry)
{
- FLTogrConvertGeometry(hGeometry, psShape,
- OGR_G_GetGeometryType(hGeometry));
+ OGRwkbGeometryType nType;
+ nType = OGR_G_GetGeometryType(hGeometry);
+ if (nType == wkbPolygon25D || nType == wkbMultiPolygon25D)
+ nType = wkbPolygon;
+ else if (nType == wkbLineString25D || nType == wkbMultiLineString25D)
+ nType = wkbLineString;
+ else if (nType == wkbPoint25D || nType == wkbMultiPoint25D)
+ nType = wkbPoint;
+ FLTogrConvertGeometry(hGeometry, psShape, nType);
}
pszSRS = (char *)CPLGetXMLValue(psTree, "srsName", NULL);
@@ -1747,9 +1754,11 @@
if (psGMLElement)
bPolygon = 1;
else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "MultiPolygon")))
- {
- bPolygon = 1;
- }
+ bPolygon = 1;
+ else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "MultiSurface")))
+ bPolygon = 1;
+ else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "Box")))
+ bPolygon = 1;
else
{
psGMLElement= CPLGetXMLNode(psXMLNode, "LineString");
@@ -1822,9 +1831,11 @@
if (psGMLElement)
bPolygon = 1;
else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "MultiPolygon")))
- {
- bPolygon = 1;
- }
+ bPolygon = 1;
+ else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "MultiSurface")))
+ bPolygon = 1;
+ else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "Box")))
+ bPolygon = 1;
else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "LineString")))
{
if (psGMLElement)
@@ -2895,10 +2906,19 @@
for (i=0; i<nTokens; i++)
{
if (i == 0)
- {
+ {
+ char *pszTmpType = NULL;
+ pszTmpType = (char *)malloc(sizeof(char)*strlen(pszAttribute)+7);
pszTmp = tokens[0];
- if (FLTIsNumeric(pszTmp) == MS_FALSE)
+ sprintf(pszTmpType, "%s_type", pszAttribute);
+ if (msOWSLookupMetadata(&(lp->metadata), "G", pszTmpType) != NULL &&
+ (strcasecmp(msOWSLookupMetadata(&(lp->metadata), "G", pszTmpType), "Character") == 0))
+ bString = 1;
+
+ else if (FLTIsNumeric(pszTmp) == MS_FALSE)
bString = 1;
+
+ msFree(pszTmpType);
}
if (bString)
sprintf(szTmp, "(%s = '%s')" , pszAttribute, tokens[i]);
More information about the mapserver-commits
mailing list