PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ make_geos_segment()

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

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

References dumpnode::geom.

Referenced by dbscan_update_context(), and geos_envelope_surrogate().

535 {
536  GEOSCoordSequence* seq = GEOSCoordSeq_create(2, 2);
537  GEOSGeometry* geom = NULL;
538 
539  if (!seq)
540  return NULL;
541 
542  GEOSCoordSeq_setX(seq, 0, x1);
543  GEOSCoordSeq_setY(seq, 0, y1);
544  GEOSCoordSeq_setX(seq, 1, x2);
545  GEOSCoordSeq_setY(seq, 1, y2);
546 
547  geom = GEOSGeom_createLineString(seq);
548  if (!geom)
549  GEOSCoordSeq_destroy(seq);
550  return geom;
551 }
LWGEOM * geom
Here is the caller graph for this function: