| 85 | } |
| 86 | |
| 87 | int FLTShapeFromGMLTree(CPLXMLNode *psTree, shapeObj *psShape , char **ppszSRS) |
| 88 | { |
| 89 | char *pszSRS = NULL; |
| 90 | if (psTree && psShape) |
| 91 | { |
| 92 | CPLXMLNode *psNext = psTree->psNext; |
| 93 | OGRGeometryH hGeometry = NULL; |
| 94 | |
| 95 | psTree->psNext = NULL; |
| 96 | hGeometry = OGR_G_CreateFromGMLTree(psTree ); |
| 97 | psTree->psNext = psNext; |
| 98 | |
| 99 | if (hGeometry) |
| 100 | { |
| 101 | OGRwkbGeometryType nType; |
| 102 | nType = OGR_G_GetGeometryType(hGeometry); |
| 103 | if (nType == wkbPolygon25D || nType == wkbMultiPolygon25D) |
| 104 | nType = wkbPolygon; |
| 105 | else if (nType == wkbLineString25D || nType == wkbMultiLineString25D) |
| 106 | nType = wkbLineString; |
| 107 | else if (nType == wkbPoint25D || nType == wkbMultiPoint25D) |
| 108 | nType = wkbPoint; |
| 109 | FLTogrConvertGeometry(hGeometry, psShape, nType); |
| 110 | |
| 111 | OGR_G_DestroyGeometry(hGeometry); |
| 112 | } |
| 113 | |
| 114 | pszSRS = (char *)CPLGetXMLValue(psTree, "srsName", NULL); |
| 115 | if (ppszSRS && pszSRS) |
| 116 | *ppszSRS = msStrdup(pszSRS); |
| 117 | |
| 118 | return MS_TRUE; |
| 119 | } |
| 120 | |
| 121 | return MS_FALSE; |
| 122 | } |
| 123 | |
| 124 | int FLTGetGeosOperator(char *pszValue) |
| 125 | { |
no test coverage detected