PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_ptarray_contains_point_sphere_iowa()

static void test_ptarray_contains_point_sphere_iowa ( void  )
static

Definition at line 1157 of file cu_geodetic.c.

1158 {
1160  LWPOLY *poly = (LWPOLY*)lwg;
1161  POINTARRAY *pa = poly->rings[0];
1162  POINT2D pt_outside, pt_to_test;
1163  int rv;
1164 
1165  pt_to_test.x = -95.900000000000006;
1166  pt_to_test.y = 42.899999999999999;
1167  pt_outside.x = -96.381873780830645;
1168  pt_outside.y = 40.185394449416371;
1169 
1170  rv = ptarray_contains_point_sphere(pa, &pt_outside, &pt_to_test);
1171  CU_ASSERT_EQUAL(rv, LW_TRUE);
1172 
1173  lwgeom_free(lwg);
1174 }
char * iowa_data
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
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
int ptarray_contains_point_sphere(const POINTARRAY *pa, const POINT2D *pt_outside, const POINT2D *pt_to_test)
This routine returns LW_TRUE if the stabline joining the pt_outside and pt_to_test crosses the ring a...
Definition: lwgeodetic.c:3645
POINTARRAY ** rings
Definition: liblwgeom.h:460
double y
Definition: liblwgeom.h:331
double x
Definition: liblwgeom.h:331

References iowa_data, LW_PARSER_CHECK_NONE, LW_TRUE, lwgeom_free(), lwgeom_from_wkt(), ptarray_contains_point_sphere(), LWPOLY::rings, POINT2D::x, and POINT2D::y.

Referenced by geodetic_suite_setup().

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