Parse gml:coordinates.
530 xmlChar *gml_coord, *gml_ts, *gml_cs, *gml_dec;
539 gml_coord = xmlNodeGetContent(xnode);
540 p = (
char *) gml_coord;
550 if (gml_ts == NULL) ts =
' ';
553 if (xmlStrlen(gml_ts) > 1 || isdigit(gml_ts[0]))
561 if (gml_cs == NULL) cs =
',';
564 if (xmlStrlen(gml_cs) > 1 || isdigit(gml_cs[0]))
571 gml_dec =
gmlGetProp(xnode, (xmlChar *)
"decimal");
572 if (gml_dec == NULL) dec =
'.';
575 if (xmlStrlen(gml_dec) > 1 || isdigit(gml_dec[0]))
581 if (cs == ts || cs == dec || ts == dec)
587 while (isspace(*p)) p++;
588 for (q = p, gml_dims=0, digit =
false ; *p ; p++)
591 if (isdigit(*p)) digit =
true;
599 if (*(p+1) ==
'\0')
gml_lwpgerror(
"invalid GML representation", 19);
608 else if (digit && (*p == ts || *(p+1) ==
'\0'))
610 if (*p == ts) *p =
'\0';
613 if (gml_dims < 2 || gml_dims > 3)
632 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)