PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ test_itree_square()

static void test_itree_square ( void  )
static

Definition at line 458 of file cu_tree.c.

459 {
460  const char *wktPoly =
461  "MULTIPOLYGON(((-1 -1, 0 -1, 1 -1, 1 0, 1 1, -1 1, -1 -1)))";
462 
463  /* inside square */
464  test_itree_once(wktPoly, 0.5, 0.5, ITREE_INSIDE);
465  /* inside square at vertex */
466  test_itree_once(wktPoly, 0.0, 0.0, ITREE_INSIDE);
467  /* left of square */
468  test_itree_once(wktPoly, -3.0, 0.0, ITREE_OUTSIDE);
469  /* right of square */
470  test_itree_once(wktPoly, 3.0, 0.0, ITREE_OUTSIDE);
471  /* above square */
472  test_itree_once(wktPoly, 0.0, 3.0, ITREE_OUTSIDE);
473  /* on horizontal boundary */
474  test_itree_once(wktPoly, 0.0, 1.0, ITREE_BOUNDARY);
475  /* on vertical boundary */
476  test_itree_once(wktPoly, -1.0, 0.0, ITREE_BOUNDARY);
477 }
static void test_itree_once(const char *polyWkt, double x, double y, IntervalTreeResult iexp)
Definition: cu_tree.c:442
@ ITREE_BOUNDARY
Definition: intervaltree.h:34
@ ITREE_INSIDE
Definition: intervaltree.h:33
@ ITREE_OUTSIDE
Definition: intervaltree.h:35

References ITREE_BOUNDARY, ITREE_INSIDE, ITREE_OUTSIDE, and test_itree_once().

Referenced by tree_suite_setup().

Here is the call graph for this function:
Here is the caller graph for this function: