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

Function FLTGetBBOX

mapogcfilter.c:1885–1915  ·  view source on GitHub ↗

/ FLTGetBBOX */ / Loop through the nodes are return the coordinates of the */ first bbox node found. The retrun value is the epsg code of */ the bbox. */ /

Source from the content-addressed store, hash-verified

1883/* the bbox. */
1884/************************************************************************/
1885char *FLTGetBBOX(FilterEncodingNode *psFilterNode, rectObj *psRect)
1886{
1887 char *pszReturn = NULL;
1888
1889 if (!psFilterNode || !psRect)
1890 return NULL;
1891
1892 if (psFilterNode->pszValue && strcasecmp(psFilterNode->pszValue, "BBOX") == 0)
1893 {
1894 if (psFilterNode->psRightNode && psFilterNode->psRightNode->pOther)
1895 {
1896 psRect->minx = ((rectObj *)psFilterNode->psRightNode->pOther)->minx;
1897 psRect->miny = ((rectObj *)psFilterNode->psRightNode->pOther)->miny;
1898 psRect->maxx = ((rectObj *)psFilterNode->psRightNode->pOther)->maxx;
1899 psRect->maxy = ((rectObj *)psFilterNode->psRightNode->pOther)->maxy;
1900
1901 return psFilterNode->psRightNode->pszValue;
1902
1903 }
1904 }
1905 else
1906 {
1907 pszReturn = FLTGetBBOX(psFilterNode->psLeftNode, psRect);
1908 if (pszReturn)
1909 return pszReturn;
1910 else
1911 return FLTGetBBOX(psFilterNode->psRightNode, psRect);
1912 }
1913
1914 return pszReturn;
1915}
1916
1917/************************************************************************/
1918/* GetMapserverExpression */

Calls 1

strcasecmpFunction · 0.85

Tested by

no test coverage detected