Parse gml:coordinates.
523 xmlChar *gml_coord, *gml_ts, *gml_cs, *gml_dec;
532 gml_coord = xmlNodeGetContent(xnode);
533 p = (
char *) gml_coord;
543 if (gml_ts == NULL) ts =
' ';
546 if (xmlStrlen(gml_ts) > 1 || isdigit(gml_ts[0]))
554 if (gml_cs == NULL) cs =
',';
557 if (xmlStrlen(gml_cs) > 1 || isdigit(gml_cs[0]))
564 gml_dec =
gmlGetProp(xnode, (xmlChar *)
"decimal");
565 if (gml_dec == NULL) dec =
'.';
568 if (xmlStrlen(gml_dec) > 1 || isdigit(gml_dec[0]))
574 if (cs == ts || cs == dec || ts == dec)
580 while (isspace(*p)) p++;
581 for (q = p, gml_dims=0, digit =
false ; *p ; p++)
584 if (isdigit(*p)) digit =
true;
592 if (*(p+1) ==
'\0')
gml_lwpgerror(
"invalid GML representation", 19);
601 else if (digit && (*p == ts || *(p+1) ==
'\0'))
603 if (*p == ts) *p =
'\0';
606 if (gml_dims < 2 || gml_dims > 3)
625 else if (*p == dec && dec !=
'.') *p =
'.';
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.
#define LW_TRUE
Return types for functions with status returns.