PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ make_geos_segment()

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

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

References dumpnode::geom.

Referenced by dbscan_update_context(), and geos_envelope_surrogate().

505 {
506  GEOSCoordSequence* seq = GEOSCoordSeq_create(2, 2);
507  GEOSGeometry* geom = NULL;
508 
509  if (!seq)
510  return NULL;
511 
512  GEOSCoordSeq_setX(seq, 0, x1);
513  GEOSCoordSeq_setY(seq, 0, y1);
514  GEOSCoordSeq_setX(seq, 1, x2);
515  GEOSCoordSeq_setY(seq, 1, y2);
516 
517  geom = GEOSGeom_createLineString(seq);
518  if (!geom)
519  GEOSCoordSeq_destroy(seq);
520  return geom;
521 }
LWGEOM * geom
Here is the caller graph for this function: