Retrieves a collection of line segments given the root and crossing value.
The collection is a multilinestring consisting of two point lines representing the segments of the ring that may be crossed by the horizontal projection line at the given y value.
Definition at line 450 of file lwgeom_rtree.c.
References LWLINE::flags, LWMLINE::flags, FLAGS_GET_Z, rtree_node::interval, IntervalIsContained(), rtree_node::leftNode, lwalloc(), lwcollection_construct(), MULTILINETYPE, rtree_node::rightNode, RTreeFindLineSegments(), RTreeMergeMultiLines(), rtree_node::segment, SRID_UNKNOWN, LWLINE::type, and LWMLINE::type.
Referenced by point_in_ring_rtree(), and RTreeFindLineSegments().
455 POSTGIS_DEBUGF(2,
"RTreeFindLineSegments called for tree %p and value %8.3f", root,
value);
461 POSTGIS_DEBUGF(3,
"RTreeFindLineSegments %p: not contained.", root);
469 POSTGIS_DEBUGF(3,
"RTreeFindLineSegments %p: adding segment %p %d.", root, root->
segment, root->
segment->
type);
482 POSTGIS_DEBUGF(3,
"RTreeFindLineSegments %p: recursing left.", root);
499 POSTGIS_DEBUGF(3,
"RTreeFindLineSegments %p: recursing right.", root);
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
static LWMLINE * RTreeMergeMultiLines(LWMLINE *line1, LWMLINE *line2)
Merges two multilinestrings into a single multilinestring.
struct rtree_node * leftNode
LWMLINE * RTreeFindLineSegments(RTREE_NODE *root, double value)
Retrieves a collection of line segments given the root and crossing value.
static uint32 IntervalIsContained(RTREE_INTERVAL *interval, double value)
Returns 1 if min < value <= max, 0 otherwise.
RTREE_INTERVAL * interval
#define SRID_UNKNOWN
Unknown SRID value.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
struct rtree_node * rightNode
void * lwalloc(size_t size)