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

Function msSLDGetComparisonValue

mapogcsld.c:4533–4558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4531
4532
4533char *msSLDGetComparisonValue(char *pszExpression)
4534{
4535 char *pszValue = NULL;
4536 if (!pszExpression)
4537 return NULL;
4538
4539 if (strstr(pszExpression, "<=") || strstr(pszExpression, " le "))
4540 pszValue = msStrdup("PropertyIsLessThanOrEqualTo");
4541 else if (strstr(pszExpression, "=~"))
4542 pszValue = msStrdup("PropertyIsLike");
4543 else if (strstr(pszExpression, "~*"))
4544 pszValue = msStrdup("PropertyIsLike");
4545 else if (strstr(pszExpression, ">=") || strstr(pszExpression, " ge "))
4546 pszValue = msStrdup("PropertyIsGreaterThanOrEqualTo");
4547 else if (strstr(pszExpression, "!=") || strstr(pszExpression, " ne "))
4548 pszValue = msStrdup("PropertyIsNotEqualTo");
4549 else if (strstr(pszExpression, "=") || strstr(pszExpression, " eq "))
4550 pszValue = msStrdup("PropertyIsEqualTo");
4551 else if (strstr(pszExpression, "<") || strstr(pszExpression, " lt "))
4552 pszValue = msStrdup("PropertyIsLessThan");
4553 else if (strstr(pszExpression, ">") || strstr(pszExpression, " gt "))
4554 pszValue = msStrdup("PropertyIsGreaterThan");
4555
4556
4557 return pszValue;
4558}
4559
4560char *msSLDGetLogicalOperator(char *pszExpression)
4561{

Callers 1

BuildExpressionTreeFunction · 0.85

Calls 1

msStrdupFunction · 0.85

Tested by

no test coverage detected