PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ test_ptarray_contains_point_sphere_iowa()

static void test_ptarray_contains_point_sphere_iowa ( void  )
static

Definition at line 1151 of file cu_geodetic.c.

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().

1152 {
1154  LWPOLY *poly = (LWPOLY*)lwg;
1155  POINTARRAY *pa = poly->rings[0];
1156  POINT2D pt_outside, pt_to_test;
1157  int rv;
1158 
1159  pt_to_test.x = -95.900000000000006;
1160  pt_to_test.y = 42.899999999999999;
1161  pt_outside.x = -96.381873780830645;
1162  pt_outside.y = 40.185394449416371;
1163 
1164  rv = ptarray_contains_point_sphere(pa, &pt_outside, &pt_to_test);
1165  CU_ASSERT_EQUAL(rv, LW_TRUE);
1166 
1167  lwgeom_free(lwg);
1168 }
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2004
double x
Definition: liblwgeom.h:330
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:3529
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:75
POINTARRAY ** rings
Definition: liblwgeom.h:459
double y
Definition: liblwgeom.h:330
char * iowa_data
Here is the call graph for this function:
Here is the caller graph for this function: