1058 xmlChar *interpolation=NULL;
1063 for (xa = xnode->children ; xa != NULL ; xa = xa->next)
1065 if (xa->type != XML_ELEMENT_NODE)
continue;
1067 if (!strcmp((
char *) xa->name,
"segments"))
1073 if (!found)
gml_lwpgerror(
"invalid GML representation", 37);
1078 for (xa = xa->children, lss=0; xa != NULL ; xa = xa->next)
1080 if (xa->type != XML_ELEMENT_NODE)
continue;
1082 if (strcmp((
char *) xa->name,
"LineStringSegment"))
continue;
1085 interpolation =
gmlGetProp(xa, (xmlChar *)
"interpolation");
1086 if (interpolation != NULL)
1088 if (strcmp((
char *) interpolation,
"linear"))
1090 xmlFree(interpolation);
1098 if (ppa[lss]->npoints < 2)
1102 if (lss == 0)
gml_lwpgerror(
"invalid GML representation", 40);
1105 if (lss == 1) pa = ppa[0];
1117 size_t cp_point_size =
sizeof(
POINT3D);
1118 size_t final_point_size = *hasz ?
sizeof(
POINT3D) :
sizeof(
POINT2D);
1130 for (
size_t i = 1; i < lss; i++)
1137 cp_point_size * (ppa[i]->npoints - 1));
1139 npoints += ppa[i]->
npoints - 1;
POINTARRAY * ptarray_construct(char hasz, char hasm, uint32_t npoints)
Construct an empty pointarray, allocating storage and setting the npoints, but not filling in any inf...
LWLINE * lwline_construct(int32_t srid, GBOX *bbox, POINTARRAY *points)
void * lwrealloc(void *mem, size_t size)
void * lwalloc(size_t size)
#define SRID_UNKNOWN
Unknown SRID value.
POINTARRAY * ptarray_flip_coordinates(POINTARRAY *pa)
Reverse X and Y axis on a given POINTARRAY.
static xmlNodePtr get_xlink_node(xmlNodePtr xnode)
Return a xmlNodePtr on a node referenced by a XLink or NULL otherwise.
static bool is_xlink(xmlNodePtr node)
Return true if current node contains a simple XLink Return false otherwise.
static POINTARRAY * gml_reproject_pa(POINTARRAY *pa, int32_t epsg_in, int32_t epsg_out)
Use Proj 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)
static uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)