PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ LWGEOM_GEOS_nodeLines()

static GEOSGeometry* LWGEOM_GEOS_nodeLines ( const GEOSGeometry *  lines)
static

Definition at line 321 of file liblwgeom/lwgeom_geos_clean.c.

References LWGEOM_GEOS_getPointN().

Referenced by LWGEOM_GEOS_makeValidLine(), and LWGEOM_GEOS_makeValidPolygon().

322 {
323  /* GEOS3.7 GEOSNode fails on regression tests */
324  /* GEOS3.7 GEOSUnaryUnion fails on regression tests */
325 
326  /* union of first point with geometry */
327  GEOSGeometry *unioned, *point;
328  point = LWGEOM_GEOS_getPointN(lines, 0);
329  if (!point) return NULL;
330  unioned = GEOSUnion(lines, point);
331  GEOSGeom_destroy(point);
332  return unioned;
333 }
GEOSGeometry * LWGEOM_GEOS_getPointN(const GEOSGeometry *, uint32_t)
Here is the call graph for this function:
Here is the caller graph for this function: