PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ test_itree_hole()

static void test_itree_hole ( void  )
static

Definition at line 479 of file cu_tree.c.

480 {
481  const char *wktPoly =
482  "POLYGON("
483  "(-10 -10, 0 -10, 10 -10, 10 0, 10 10, 0 10, -10 10, -10 -10),"
484  "(-5 -5, -5 0, -5 5, 5 5, 5 0, 5 -5, -5 -5))";
485 
486  /* inside hole */
487  test_itree_once(wktPoly, 1.0, 1.0, ITREE_OUTSIDE);
488  /* inside hole at vertical vertex */
489  test_itree_once(wktPoly, 0.0, 0.0, ITREE_OUTSIDE);
490  /* left of hole */
491  test_itree_once(wktPoly, -7.0, 0.0, ITREE_INSIDE);
492  /* right of hole */
493  test_itree_once(wktPoly, 7.0, 0.0, ITREE_INSIDE);
494  /* left of hole at top edge */
495  test_itree_once(wktPoly, -7.0, 5.0, ITREE_INSIDE);
496  /* right of hole at bottom edge */
497  test_itree_once(wktPoly, 7.0, -5.0, ITREE_INSIDE);
498  /* above hole */
499  test_itree_once(wktPoly, 0.0, 7.0, ITREE_INSIDE);
500  /* on hole boundary */
501  test_itree_once(wktPoly, 0.0, 5.0, ITREE_BOUNDARY);
502  /* on hole corner */
503  test_itree_once(wktPoly, 5.0, 5.0, ITREE_BOUNDARY);
504 }
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: