Parse gml:posList.
768 xmlChar *dimension, *gmlposlist;
776 dimension =
gmlGetProp(xnode, (xmlChar *)
"srsDimension");
777 if (dimension == NULL)
778 dimension =
gmlGetProp(xnode, (xmlChar *)
"dimension");
779 if (dimension == NULL) dim = 2;
782 dim = atoi((
char *) dimension);
784 if (dim < 2 || dim > 3)
gml_lwpgerror(
"invalid GML representation", 27);
786 if (dim == 2) *hasz =
false;
789 gmlposlist = xmlNodeGetContent(xnode);
790 poslist = (
char *) gmlposlist;
798 while (isspace(*poslist)) poslist++;
799 for (p=poslist, gml_dim=0, digit=
false ; *poslist ; poslist++)
801 if (isdigit(*poslist)) digit =
true;
802 if (digit && (*poslist ==
' ' || *(poslist+1) ==
'\0'))
804 if (*poslist ==
' ') *poslist =
'\0';
814 pt.
x = pt.
y = pt.
z = pt.
m = 0.0;
817 else if (*(poslist+1) ==
'\0')
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE,...
static double parse_gml_double(char *d, bool space_before, bool space_after)
Parse a string supposed to be a double.
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 void gml_lwpgerror(char *msg, __attribute__((__unused__)) int error_code)