Parse gml:pos.
695 xmlChar *dimension, *gmlpos;
705 dimension =
gmlGetProp(xnode, (xmlChar *)
"srsDimension");
706 if (dimension == NULL)
707 dimension =
gmlGetProp(xnode, (xmlChar *)
"dimension");
708 if (dimension == NULL) dim = 2;
711 dim = atoi((
char *) dimension);
713 if (dim < 2 || dim > 3)
716 if (dim == 2) *hasz =
false;
719 gmlpos = xmlNodeGetContent(xnode);
720 pos = (
char *) gmlpos;
721 while (isspace(*pos)) pos++;
726 for (p=pos, gml_dim=0, digit=
false ; *pos ; pos++)
728 if (isdigit(*pos)) digit =
true;
729 if (digit && (*pos ==
' ' || *(pos+1) ==
'\0'))
731 if (*pos ==
' ') *pos =
'\0';
735 else if (gml_dim == 2)
737 else if (gml_dim == 3)
747 if (gml_dim == 2) *hasz =
false;
748 if (gml_dim < 2 || gml_dim > 3 || gml_dim != dim)
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.