Parse gml:pos.
701 xmlChar *dimension, *gmlpos;
711 dimension =
gmlGetProp(xnode, (xmlChar *)
"srsDimension");
712 if (dimension == NULL)
713 dimension =
gmlGetProp(xnode, (xmlChar *)
"dimension");
714 if (dimension == NULL) dim = 2;
717 dim = atoi((
char *) dimension);
719 if (dim < 2 || dim > 3)
722 if (dim == 2) *hasz =
false;
725 gmlpos = xmlNodeGetContent(xnode);
726 pos = (
char *) gmlpos;
727 while (isspace(*pos)) pos++;
732 for (p=pos, gml_dim=0, digit=
false ; *pos ; pos++)
734 if (isdigit(*pos)) digit =
true;
735 if (digit && (*pos ==
' ' || *(pos+1) ==
'\0'))
737 if (*pos ==
' ') *pos =
'\0';
741 else if (gml_dim == 2)
743 else if (gml_dim == 3)
753 if (gml_dim == 2) *hasz =
false;
754 if (gml_dim < 2 || gml_dim > 3 || gml_dim != dim)
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)