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.
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);
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
void * lwalloc(size_t size)
#define SRID_UNKNOWN
Unknown SRID value.
static LWMLINE * RTreeMergeMultiLines(LWMLINE *line1, LWMLINE *line2)
Merges two multilinestrings into a single multilinestring.
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.
struct rtree_node * leftNode
struct rtree_node * rightNode
RTREE_INTERVAL * interval
References LWLINE::flags, LWMLINE::flags, FLAGS_GET_Z, rtree_node::interval, IntervalIsContained(), rtree_node::leftNode, lwalloc(), lwcollection_construct(), MULTILINETYPE, rtree_node::rightNode, RTreeMergeMultiLines(), rtree_node::segment, SRID_UNKNOWN, LWLINE::type, LWMLINE::type, and genraster::value.
Referenced by point_in_ring_rtree().