PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ test_itree_degenerate_poly()

static void test_itree_degenerate_poly ( void  )
static

Definition at line 602 of file cu_tree.c.

603{
604 /* collapsed polygon */
605 const char *wktPoly = "POLYGON((0 0, 0 0, 0 0, 0 0))";
606 test_itree_once(wktPoly, 2.0, 2.0, ITREE_OUTSIDE);
607
608 /* zero area polygon */
609 wktPoly = "POLYGON((0 0, 0 1, 0 1, 0 0))";
610 test_itree_once(wktPoly, 2.0, 2.0, ITREE_OUTSIDE);
611 test_itree_once(wktPoly, 0, 0.5, ITREE_BOUNDARY);
612 test_itree_once(wktPoly, 0, 1, ITREE_BOUNDARY);
613
614 /* zero area polygon */
615 wktPoly = "POLYGON((0 0, 0 1, 1 1, 2 2, 1 1, 0 1, 0 0))";
616 test_itree_once(wktPoly, 0.5, 0.5, ITREE_OUTSIDE);
617 test_itree_once(wktPoly, 1, 1, ITREE_BOUNDARY);
618
619 /* non finite coordinates */
620 wktPoly = "POLYGON((0 0, 0 NaN, 0 NaN, 0 0, 0 1, 0 0))";
621 test_itree_once(wktPoly, 2.0, 2.0, ITREE_OUTSIDE);
622 test_itree_once(wktPoly, 0, 0, ITREE_BOUNDARY);
623}
static void test_itree_once(const char *polyWkt, double x, double y, IntervalTreeResult iexp)
Definition cu_tree.c:442
@ ITREE_BOUNDARY
@ ITREE_OUTSIDE

References ITREE_BOUNDARY, 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: