PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ test_wkt_in_polyhedralsurface()

static void test_wkt_in_polyhedralsurface ( void  )
static

Definition at line 308 of file cu_in_wkt.c.

References cu_wkt_in(), lwfree(), r, s, WKT_EXTENDED, and WKT_ISO.

Referenced by wkt_in_suite_setup().

309 {
310  s = "POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))";
312  CU_ASSERT_STRING_EQUAL(r,s);
313  //printf("\nIN: %s\nOUT: %s\n",s,r);
314  lwfree(r);
315 
316  s = "POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))";
317  r = cu_wkt_in(s, WKT_ISO);
318  CU_ASSERT_STRING_EQUAL(r,s);
319  //printf("\nIN: %s\nOUT: %s\n",s,r);
320  lwfree(r);
321 
322  s = "POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7,0 1 2)))";
323  r = cu_wkt_in(s, WKT_ISO);
324  CU_ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry");
325  //printf("\nIN: %s\nOUT: %s\n",s,r);
326  lwfree(r);
327 
328 }
char * r
Definition: cu_in_wkt.c:24
void lwfree(void *mem)
Definition: lwutil.c:214
#define WKT_ISO
Definition: liblwgeom.h:1939
char * s
Definition: cu_in_wkt.c:23
#define WKT_EXTENDED
Definition: liblwgeom.h:1941
static char * cu_wkt_in(char *wkt, uint8_t variant)
Definition: cu_in_wkt.c:50
Here is the call graph for this function:
Here is the caller graph for this function: