PostGIS  2.5.1dev-r@@SVN_REVISION@@
lwtree.c File Reference
#include "liblwgeom_internal.h"
#include "lwgeom_log.h"
#include "lwtree.h"
#include "measures.h"
Include dependency graph for lwtree.c:

Go to the source code of this file.


static int rect_node_is_leaf (const RECT_NODE *node)
static int rect_node_cmp (const void *pn1, const void *pn2)
void rect_tree_free (RECT_NODE *node)
 Recurse from top of node tree and free all children. More...
static int rect_leaf_node_intersects (RECT_NODE_LEAF *n1, RECT_NODE_LEAF *n2)
static int rect_leaf_node_segment_side (RECT_NODE_LEAF *node, const POINT2D *q, int *on_boundary)
static int rect_tree_ring_contains_point (RECT_NODE *node, const POINT2D *pt, int *on_boundary)
static int rect_tree_area_contains_point (RECT_NODE *node, const POINT2D *pt)
static int rect_node_bounds_point (RECT_NODE *node, const POINT2D *pt)
int rect_tree_contains_point (RECT_NODE *node, const POINT2D *pt)
static int rect_tree_is_area (const RECT_NODE *node)
static RECT_NODErect_node_leaf_new (const POINTARRAY *pa, int seg_num, int geom_type)
static void rect_node_internal_add_node (RECT_NODE *node, RECT_NODE *add)
static RECT_NODErect_node_internal_new (const RECT_NODE *seed)
static RECT_NODErect_nodes_merge (RECT_NODE **nodes, uint32_t num_nodes)
RECT_NODErect_tree_from_ptarray (const POINTARRAY *pa, int geom_type)
LWGEOMrect_tree_to_lwgeom (const RECT_NODE *node)
char * rect_tree_to_wkt (const RECT_NODE *node)
void rect_tree_printf (const RECT_NODE *node, int depth)
static RECT_NODErect_tree_from_lwpoint (const LWGEOM *lwgeom)
static RECT_NODErect_tree_from_lwline (const LWGEOM *lwgeom)
static RECT_NODErect_tree_from_lwpoly (const LWGEOM *lwgeom)
static RECT_NODErect_tree_from_lwcurvepoly (const LWGEOM *lwgeom)
static RECT_NODErect_tree_from_lwcollection (const LWGEOM *lwgeom)
RECT_NODErect_tree_from_lwgeom (const LWGEOM *lwgeom)
 Create a tree index on top an LWGEOM. More...
static const POINT2Drect_tree_get_point (const RECT_NODE *node)
static int rect_node_intersects (const RECT_NODE *n1, const RECT_NODE *n2)
static int rect_tree_intersects_tree_recursive (RECT_NODE *n1, RECT_NODE *n2)
int rect_tree_intersects_tree (RECT_NODE *n1, RECT_NODE *n2)
 Test if two RECT_NODE trees intersect one another. More...
static double distance_sq (double x1, double y1, double x2, double y2)
static double distance (double x1, double y1, double x2, double y2)
static double rect_node_min_distance (const RECT_NODE *n1, const RECT_NODE *n2)
static double rect_node_max_distance (const RECT_NODE *n1, const RECT_NODE *n2)
static double rect_leaf_node_distance (const RECT_NODE_LEAF *n1, const RECT_NODE_LEAF *n2, RECT_TREE_DISTANCE_STATE *state)
static int rect_tree_node_sort_cmp (const void *a, const void *b)
static void rect_node_to_p2d (const RECT_NODE *n, POINT2D *pt)
static void rect_tree_node_sort (RECT_NODE *n1, RECT_NODE *n2)
static double rect_tree_distance_tree_recursive (RECT_NODE *n1, RECT_NODE *n2, RECT_TREE_DISTANCE_STATE *state)
double rect_tree_distance_tree (RECT_NODE *n1, RECT_NODE *n2, double threshold)
 Return the distance between two RECT_NODE trees. More...


static RECT_NODE_SEG_TYPE lwgeomTypeArc []