1290 xmlChar *interpolation=NULL;
1298 if (strcmp((
char *) xnode->name,
"PolygonPatch"))
1302 interpolation =
gmlGetProp(xnode, (xmlChar *)
"interpolation");
1303 if (interpolation != NULL)
1305 if (strcmp((
char *) interpolation,
"planar"))
1307 xmlFree(interpolation);
1313 for (xa = xnode->children ; xa != NULL ; xa = xa->next)
1316 if (strcmp((
char *) xa->name,
"exterior"))
continue;
1319 for (xb = xa->children ; xb != NULL ; xb = xb->next)
1321 if (xb->type != XML_ELEMENT_NODE)
continue;
1323 if (strcmp((
char *) xb->name,
"LinearRing"))
continue;
1328 if (ppa[0]->npoints < 4
1343 for (ring=1, xa = xnode->children ; xa != NULL ; xa = xa->next)
1345 if (xa->type != XML_ELEMENT_NODE)
continue;
1347 if (strcmp((
char *) xa->name,
"interior"))
continue;
1350 for (xb = xa->children ; xb != NULL ; xb = xb->next)
1352 if (xb->type != XML_ELEMENT_NODE)
continue;
1353 if (strcmp((
char *) xb->name,
"LinearRing"))
continue;
1359 if (ppa[ring]->npoints < 4
1372 if (ppa == NULL || ppa[0] == NULL)
gml_lwpgerror(
"invalid GML representation", 50);
1376 for (i=0 ; i < ring ; i++)
static void gml_lwpgerror(char *msg, int error_code)
static void parse_gml_srs(xmlNodePtr xnode, gmlSrs *srs)
Parse gml srsName attribute.
int ptarray_is_closed_3d(const POINTARRAY *pa)
static xmlChar * gmlGetProp(xmlNodePtr xnode, xmlChar *prop)
Retrieve a GML propertie from a node or NULL otherwise Respect namespaces if presents in the node ele...
int ptarray_is_closed_2d(const POINTARRAY *pa)
static POINTARRAY * gml_reproject_pa(POINTARRAY *pa, int srid_in, int srid_out)
Use Proj4 to reproject a given POINTARRAY.
POINTARRAY * ptarray_flip_coordinates(POINTARRAY *pa)
Reverse X and Y axis on a given POINTARRAY.
LWPOLY * lwpoly_construct(int srid, GBOX *bbox, uint32_t nrings, POINTARRAY **points)
#define SRID_UNKNOWN
Unknown SRID value.
static POINTARRAY * parse_gml_data(xmlNodePtr xnode, bool *hasz, int *root_srid)
Parse data coordinates.
static bool is_gml_namespace(xmlNodePtr xnode, bool is_strict)
Return false if current element namespace is not a GML one Return true otherwise. ...
void * lwrealloc(void *mem, size_t size)
void * lwalloc(size_t size)