PostGIS  2.1.10dev-r@@SVN_REVISION@@
static LWGEOM* parse_kml_line ( xmlNodePtr  xnode,
bool *  hasz 
)
static

Parse KML lineString.

Definition at line 367 of file lwgeom_in_kml.c.

References lwerror(), lwline_construct(), POINTARRAY::npoints, and parse_kml_coordinates().

Referenced by parse_kml().

368 {
369  POINTARRAY *pa;
370 
371  if (xnode->children == NULL) lwerror("invalid KML representation");
372  pa = parse_kml_coordinates(xnode->children, hasz);
373  if (pa->npoints < 2) lwerror("invalid KML representation");
374 
375  return (LWGEOM *) lwline_construct(4326, NULL, pa);
376 }
int npoints
Definition: liblwgeom.h:327
static POINTARRAY * parse_kml_coordinates(xmlNodePtr xnode, bool *hasz)
Parse kml:coordinates.
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:67
LWLINE * lwline_construct(int srid, GBOX *bbox, POINTARRAY *points)
Definition: lwline.c:29

Here is the call graph for this function:

Here is the caller graph for this function: