Permalink
Browse files

Adding support for MultiPoint in filter encoding.

  • Loading branch information...
1 parent 9eeecea commit afcb21af371b4eaecf8c120efbbbe64c07e3c93e @mkofahl mkofahl committed with tbonfort Mar 26, 2013
Showing with 15 additions and 18 deletions.
  1. +14 −17 mapogcfilter.c
  2. +1 −1 msautotest
View
@@ -776,6 +776,8 @@ int FLTLayerApplyPlainFilterToLayer(FilterEncodingNode *psNode, mapObj *map,
int status =MS_FALSE;
pszExpression = FLTGetCommonExpression(psNode, GET_LAYER(map, iLayerIndex));
+ if(map->debug == MS_DEBUGLEVEL_VVV)
+ msDebug("FLTLayerApplyPlainFilterToLayer(): %s\n", pszExpression);
if (pszExpression) {
status = FLTApplyFilterToLayerCommonExpression(map, iLayerIndex, pszExpression);
msFree(pszExpression);
@@ -1207,11 +1209,10 @@ void FLTInsertElementInNode(FilterEncodingNode *psFilterNode,
bPolygon = 1;
else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "Box")))
bPolygon = 1;
- else {
- psGMLElement= CPLGetXMLNode(psXMLNode, "LineString");
- if (psGMLElement)
- bLine = 1;
- }
+ else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "LineString")))
+ bLine = 1;
+ else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "MultiPoint")))
+ bPoint = 1;
}
psDistance = CPLGetXMLNode(psXMLNode, "Distance");
@@ -1278,18 +1279,14 @@ void FLTInsertElementInNode(FilterEncodingNode *psFilterNode,
bPolygon = 1;
else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "Box")))
bPolygon = 1;
- else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "LineString"))) {
- if (psGMLElement)
- bLine = 1;
- }
-
- else {
- psGMLElement = CPLGetXMLNode(psXMLNode, "Point");
- if (!psGMLElement)
- psGMLElement = CPLGetXMLNode(psXMLNode, "PointType");
- if (psGMLElement)
- bPoint =1;
- }
+ else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "LineString")))
+ bLine = 1;
+ else if ((psGMLElement= CPLGetXMLNode(psXMLNode, "MultiPoint")))
+ bPoint = 1;
+ else if ((psGMLElement = CPLGetXMLNode(psXMLNode, "Point")))
+ bPoint = 1;
+ else if ((psGMLElement = CPLGetXMLNode(psXMLNode, "PointType")))
+ bPoint = 1;
if (psGMLElement) {
psShape = (shapeObj *)msSmallMalloc(sizeof(shapeObj));

0 comments on commit afcb21a

Please sign in to comment.