Parse gml:posList.
762 xmlChar *dimension, *gmlposlist;
770 dimension =
gmlGetProp(xnode, (xmlChar *)
"srsDimension");
771 if (dimension == NULL)
772 dimension =
gmlGetProp(xnode, (xmlChar *)
"dimension");
773 if (dimension == NULL) dim = 2;
776 dim = atoi((
char *) dimension);
778 if (dim < 2 || dim > 3)
gml_lwpgerror(
"invalid GML representation", 27);
780 if (dim == 2) *hasz =
false;
783 gmlposlist = xmlNodeGetContent(xnode);
784 poslist = (
char *) gmlposlist;
792 while (isspace(*poslist)) poslist++;
793 for (p=poslist, gml_dim=0, digit=
false ; *poslist ; poslist++)
795 if (isdigit(*poslist)) digit =
true;
796 if (digit && (*poslist ==
' ' || *(poslist+1) ==
'\0'))
798 if (*poslist ==
' ') *poslist =
'\0';
810 else if (*(poslist+1) ==
'\0')
static void gml_lwpgerror(char *msg, int error_code)
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
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...
static double parse_gml_double(char *d, bool space_before, bool space_after)
Parse a string supposed to be a double.
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, then a duplicate point will not be added.