Parse gml:coordinates.
576 xmlChar *gml_coord, *gml_ts, *gml_cs, *gml_dec;
585 gml_coord = xmlNodeGetContent(xnode);
586 p = (
char *) gml_coord;
596 if (gml_ts == NULL) ts =
' ';
599 if (xmlStrlen(gml_ts) > 1 || isdigit(gml_ts[0]))
607 if (gml_cs == NULL) cs =
',';
610 if (xmlStrlen(gml_cs) > 1 || isdigit(gml_cs[0]))
617 gml_dec =
gmlGetProp(xnode, (xmlChar *)
"decimal");
618 if (gml_dec == NULL) dec =
'.';
621 if (xmlStrlen(gml_dec) > 1 || isdigit(gml_dec[0]))
627 if (cs == ts || cs == dec || ts == dec)
633 while (isspace(*p)) p++;
634 for (q = p, gml_dims=0, digit =
false ; *p ; p++)
637 if (isdigit(*p)) digit =
true;
645 if (*(p+1) ==
'\0')
gml_lwpgerror(
"invalid GML representation", 19);
654 else if (digit && (*p == ts || *(p+1) ==
'\0'))
656 if (*p == ts) *p =
'\0';
659 if (gml_dims < 2 || gml_dims > 3)
678 else if (*p == dec && dec !=
'.') *p =
'.';
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,...
#define LW_TRUE
Return types for functions with status returns.
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)