MCPcopy Create free account
hub / github.com/MapServer/MapServer / FLTValidForBBoxFilter

Function FLTValidForBBoxFilter

mapogcfilter.c:1711–1737  ·  view source on GitHub ↗

/ FLTValidForBBoxFilter */ / Validate if there is only one BBOX filter node. Here is waht */ is supported (is valid) : */ - one node which is a BBOX */ - a logical AND with a valid BBOX */ / eg 1: */

Source from the content-addressed store, hash-verified

1709/* */
1710/************************************************************************/
1711int FLTValidForBBoxFilter(FilterEncodingNode *psFilterNode)
1712{
1713 int nCount = 0;
1714
1715 if (!psFilterNode || !psFilterNode->pszValue)
1716 return 1;
1717
1718 nCount = FLTNumberOfFilterType(psFilterNode, "BBOX");
1719
1720 if (nCount > 1)
1721 return 0;
1722 else if (nCount == 0)
1723 return 1;
1724
1725 /* nCount ==1 */
1726 if (strcasecmp(psFilterNode->pszValue, "BBOX") == 0)
1727 return 1;
1728
1729 if (strcasecmp(psFilterNode->pszValue, "AND") == 0)
1730 {
1731 if (strcasecmp(psFilterNode->psLeftNode->pszValue, "BBOX") ==0 ||
1732 strcasecmp(psFilterNode->psRightNode->pszValue, "BBOX") ==0)
1733 return 1;
1734 }
1735
1736 return 0;
1737}
1738
1739int FLTIsLineFilter(FilterEncodingNode *psFilterNode)
1740{

Callers 1

FLTIsSimpleFilterFunction · 0.85

Calls 2

FLTNumberOfFilterTypeFunction · 0.85
strcasecmpFunction · 0.85

Tested by

no test coverage detected