Parse gml:coordinates.
608 xmlChar *gml_coord, *gml_ts, *gml_cs, *gml_dec;
617 gml_coord = xmlNodeGetContent(xnode);
618 p = (
char *) gml_coord;
628 if (gml_ts == NULL) ts =
' ';
631 if (xmlStrlen(gml_ts) > 1 || isdigit(gml_ts[0]))
639 if (gml_cs == NULL) cs =
',';
642 if (xmlStrlen(gml_cs) > 1 || isdigit(gml_cs[0]))
650 if (gml_dec == NULL) dec =
'.';
653 if (xmlStrlen(gml_dec) > 1 || isdigit(gml_dec[0]))
659 if (cs == ts || cs == dec || ts == dec)
665 while (isspace(*p)) p++;
666 for (q = p, gml_dims=0, digit =
false ; *p ; p++)
669 if (isdigit(*p)) digit =
true;
677 if (*(p+1) ==
'\0')
gml_lwpgerror(
"invalid GML representation", 19);
686 else if (digit && (*p == ts || *(p+1) ==
'\0'))
688 if (*p == ts) *p =
'\0';
691 if (gml_dims < 2 || gml_dims > 3)
710 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, const char *charProp)
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)