| 42 | #ifdef USE_OGR |
| 43 | |
| 44 | int FLTIsNumeric(char *pszValue) |
| 45 | { |
| 46 | if (pszValue) |
| 47 | { |
| 48 | /*the regex seems to have a problem on windows when mapserver is built using |
| 49 | PHP regex*/ |
| 50 | #if defined(_WIN32) && !defined(__CYGWIN__) |
| 51 | int i = 0, nLength=0, bString=0; |
| 52 | |
| 53 | nLength = strlen(pszValue); |
| 54 | for (i=0; i<nLength; i++) |
| 55 | { |
| 56 | if (i == 0) |
| 57 | { |
| 58 | if (!isdigit(pszValue[i]) && pszValue[i] != '-') |
| 59 | { |
| 60 | bString = 1; |
| 61 | break; |
| 62 | } |
| 63 | } |
| 64 | else if (!isdigit(pszValue[i]) && pszValue[i] != '.') |
| 65 | { |
| 66 | bString = 1; |
| 67 | break; |
| 68 | } |
| 69 | } |
| 70 | if (!bString) |
| 71 | return MS_TRUE; |
| 72 | #else |
| 73 | if (msEvalRegex("^[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$", pszValue) == MS_TRUE) |
| 74 | return MS_TRUE; |
| 75 | #endif |
| 76 | } |
| 77 | |
| 78 | return MS_FALSE; |
| 79 | } |
| 80 | |
| 81 | int FLTogrConvertGeometry(OGRGeometryH hGeometry, shapeObj *psShape, |
| 82 | OGRwkbGeometryType nType) |
no test coverage detected