1306 xmlChar *interpolation=NULL;
1314 if (strcmp((
char *) xnode->name,
"PolygonPatch"))
1318 interpolation =
gmlGetProp(xnode, (xmlChar *)
"interpolation");
1319 if (interpolation != NULL)
1321 if (strcmp((
char *) interpolation,
"planar"))
1323 xmlFree(interpolation);
1329 for (xa = xnode->children ; xa != NULL ; xa = xa->next)
1332 if (strcmp((
char *) xa->name,
"exterior"))
continue;
1335 for (xb = xa->children ; xb != NULL ; xb = xb->next)
1337 if (xb->type != XML_ELEMENT_NODE)
continue;
1339 if (strcmp((
char *) xb->name,
"LinearRing"))
continue;
1344 if (ppa[0]->npoints < 4
1359 for (ring=1, xa = xnode->children ; xa != NULL ; xa = xa->next)
1361 if (xa->type != XML_ELEMENT_NODE)
continue;
1363 if (strcmp((
char *) xa->name,
"interior"))
continue;
1366 for (xb = xa->children ; xb != NULL ; xb = xb->next)
1368 if (xb->type != XML_ELEMENT_NODE)
continue;
1369 if (strcmp((
char *) xb->name,
"LinearRing"))
continue;
1375 if (ppa[ring]->npoints < 4
1388 if (ppa == NULL || ppa[0] == NULL)
gml_lwpgerror(
"invalid GML representation", 50);
1392 for (i=0 ; i < ring ; i++)
int ptarray_is_closed_3d(const POINTARRAY *pa)
void * lwrealloc(void *mem, size_t size)
LWPOLY * lwpoly_construct(int srid, GBOX *bbox, uint32_t nrings, POINTARRAY **points)
void * lwalloc(size_t size)
int ptarray_is_closed_2d(const POINTARRAY *pa)
#define SRID_UNKNOWN
Unknown SRID value.
POINTARRAY * ptarray_flip_coordinates(POINTARRAY *pa)
Reverse X and Y axis on a given POINTARRAY.
static POINTARRAY * gml_reproject_pa(POINTARRAY *pa, int srid_in, int srid_out)
Use Proj4 to reproject a given POINTARRAY.
static xmlChar * gmlGetProp(xmlNodePtr xnode, xmlChar *prop)
Retrieve a GML property from a node or NULL otherwise Respect namespaces if presents in the node elem...
static bool is_gml_namespace(xmlNodePtr xnode, bool is_strict)
Return false if current element namespace is not a GML one Return true otherwise.
static void parse_gml_srs(xmlNodePtr xnode, gmlSrs *srs)
Parse gml srsName attribute.
static POINTARRAY * parse_gml_data(xmlNodePtr xnode, bool *hasz, int *root_srid)
Parse data coordinates.
static void gml_lwpgerror(char *msg, __attribute__((__unused__)) int error_code)