PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ make_geos_segment()

GEOSGeometry* make_geos_segment ( double  x1,
double  y1,
double  x2,
double  y2 
)

Definition at line 474 of file liblwgeom/lwgeom_geos.c.

References dumpnode::geom.

Referenced by dbscan_update_context(), and geos_envelope_surrogate().

475 {
476  GEOSCoordSequence* seq = GEOSCoordSeq_create(2, 2);
477  GEOSGeometry* geom = NULL;
478 
479  if (!seq) return NULL;
480 
481  GEOSCoordSeq_setX(seq, 0, x1);
482  GEOSCoordSeq_setY(seq, 0, y1);
483  GEOSCoordSeq_setX(seq, 1, x2);
484  GEOSCoordSeq_setY(seq, 1, y2);
485 
486  geom = GEOSGeom_createLineString(seq);
487  if (!geom) GEOSCoordSeq_destroy(seq);
488  return geom;
489 }
LWGEOM * geom
Here is the caller graph for this function: