PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ make_geos_segment()

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

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

References dumpnode::geom.

Referenced by dbscan_update_context(), and geos_envelope_surrogate().

517 {
518  GEOSCoordSequence* seq = GEOSCoordSeq_create(2, 2);
519  GEOSGeometry* geom = NULL;
520 
521  if (!seq) return NULL;
522 
523  GEOSCoordSeq_setX(seq, 0, x1);
524  GEOSCoordSeq_setY(seq, 0, y1);
525  GEOSCoordSeq_setX(seq, 1, x2);
526  GEOSCoordSeq_setY(seq, 1, y2);
527 
528  geom = GEOSGeom_createLineString(seq);
529  if (!geom) GEOSCoordSeq_destroy(seq);
530  return geom;
531 }
LWGEOM * geom
Here is the caller graph for this function: