PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_rect_tree_distance_tree_case()

static double test_rect_tree_distance_tree_case ( const char *  wkt1,
const char *  wkt2 
)
static

Definition at line 477 of file cu_measures.c.

478 {
481  RECT_NODE *n1 = rect_tree_from_lwgeom(lw1);
482  RECT_NODE *n2 = rect_tree_from_lwgeom(lw2);
483 
484  // rect_tree_printf(n1, 0);
485  // rect_tree_printf(n2, 0);
486  //
487  // printf("%s\n", rect_tree_to_wkt(n1));
488  // printf("%s\n", rect_tree_to_wkt(n2));
489 
490  double dist = rect_tree_distance_tree(n1, n2, 0.0);
491  // printf("%g\n", dist);
492  rect_tree_free(n1);
493  rect_tree_free(n2);
494  lwgeom_free(lw1);
495  lwgeom_free(lw2);
496  return dist;
497 }
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2005
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904
RECT_NODE * rect_tree_from_lwgeom(const LWGEOM *lwgeom)
Create a tree index on top an LWGEOM.
Definition: lwtree.c:861
void rect_tree_free(RECT_NODE *node)
Recurse from top of node tree and free all children.
Definition: lwtree.c:69
double rect_tree_distance_tree(RECT_NODE *n1, RECT_NODE *n2, double threshold)
Return the distance between two RECT_NODE trees.
Definition: lwtree.c:1354

References LW_PARSER_CHECK_NONE, lwgeom_free(), lwgeom_from_wkt(), rect_tree_distance_tree(), rect_tree_free(), and rect_tree_from_lwgeom().

Here is the call graph for this function: