MCPcopy Index your code
hub / github.com/MapServer/MapServer / FLTShapeFromGMLTree

Function FLTShapeFromGMLTree

mapogcfilter.c:87–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87int 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
124int FLTGetGeosOperator(char *pszValue)
125{

Callers 1

FLTInsertElementInNodeFunction · 0.85

Calls 2

FLTogrConvertGeometryFunction · 0.85
msStrdupFunction · 0.85

Tested by

no test coverage detected