Check if first and last point of line2 are covered by line1 and then each point in between has to be one line1 in the exact same order return LW_TRUE if all edge points of line2 are on line1.
Definition at line 2786 of file lwgeodetic.c.
2797 LWDEBUG(4,
"returning false, first point of line2 is not covered by line1");
2804 LWDEBUG(4,
"returning false, last point of line2 is not covered by line1");
2810 while (i < lwline1->points->npoints - 1 && j < lwline2->points->npoints - 1)
2848 LWDEBUG(4,
"returning false, found point not covered by both lines");
#define LW_TRUE
Return types for functions with status returns.
const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
LWPOINT * lwline_get_lwpoint(const LWLINE *line, uint32_t where)
Returns freshly allocated LWPOINT that corresponds to the index where.
int lwline_covers_lwpoint(const LWLINE *lwline, const LWPOINT *lwpoint)
return LW_TRUE if any of the line segments covers the point
void geographic_point_init(double lon, double lat, GEOGRAPHIC_POINT *g)
Initialize a geographic point.
int edge_contains_point(const GEOGRAPHIC_EDGE *e, const GEOGRAPHIC_POINT *p)
Returns true if the point p is on the minor edge defined by the end points of e.
#define LWDEBUG(level, msg)
Two-point great circle segment from a to b.
Point in spherical coordinates on the world.
References edge_contains_point(), GEOGRAPHIC_EDGE::end, geographic_point_init(), getPoint2d_cp(), LW_FALSE, LW_TRUE, LWDEBUG, lwline_covers_lwpoint(), lwline_get_lwpoint(), POINTARRAY::npoints, LWLINE::points, GEOGRAPHIC_EDGE::start, POINT2D::x, and POINT2D::y.
Referenced by lwgeom_covers_lwgeom_sphere().