PostGIS  2.5.0dev-r@@SVN_REVISION@@
GEOSGeometry* make_geos_segment ( double  x1,
double  y1,
double  x2,
double  y2 
)

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

References dumpnode::geom.

Referenced by dbscan_update_context(), and geos_envelope_surrogate().

529 {
530  GEOSCoordSequence* seq = GEOSCoordSeq_create(2, 2);
531  GEOSGeometry* geom = NULL;
532 
533  if (!seq)
534  return NULL;
535 
536  GEOSCoordSeq_setX(seq, 0, x1);
537  GEOSCoordSeq_setY(seq, 0, y1);
538  GEOSCoordSeq_setX(seq, 1, x2);
539  GEOSCoordSeq_setY(seq, 1, y2);
540 
541  geom = GEOSGeom_createLineString(seq);
542  if (!geom)
543  GEOSCoordSeq_destroy(seq);
544  return geom;
545 }
LWGEOM * geom

Here is the caller graph for this function: