PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ test_wkb_out_polygon()

static void test_wkb_out_polygon ( void  )
static

Definition at line 115 of file cu_out_wkb.c.

References cu_wkb(), cu_wkb_from_hexwkb(), and s.

Referenced by wkb_out_suite_setup().

116 {
117  cu_wkb("SRID=4;POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))");
118  CU_ASSERT_STRING_EQUAL(s,"00A000000300000004000000010000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
119 
120  cu_wkb("SRID=14;POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))");
121  CU_ASSERT_STRING_EQUAL(s,"00E00000030000000E00000001000000050000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF0000000000000000000000000000040000000000000003FF00000000000003FF0000000000000000000000000000040080000000000003FF00000000000000000000000000000000000000000000040100000000000000000000000000000000000000000000000000000000000004014000000000000");
122 
123  cu_wkb("SRID=4;POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))");
124  CU_ASSERT_STRING_EQUAL(s,"00E00000030000000400000001000000050000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF0000000000000000000000000000040000000000000003FF00000000000003FF0000000000000000000000000000040080000000000003FF00000000000000000000000000000000000000000000040100000000000000000000000000000000000000000000000000000000000004014000000000000");
125 
126  cu_wkb("POLYGON EMPTY");
127  CU_ASSERT_STRING_EQUAL(s,"000000000300000000");
128 
129  /*
130  * POLYGON with EMPTY shell
131  * See http://http://trac.osgeo.org/postgis/ticket/937
132  */
133  cu_wkb_from_hexwkb("01030000000100000000000000");
134  CU_ASSERT_STRING_EQUAL(s,"000000000300000000");
135 }
static void cu_wkb(char *wkt)
Definition: cu_out_wkb.c:61
static void cu_wkb_from_hexwkb(char *hexwkb)
Definition: cu_out_wkb.c:50
char * s
Definition: cu_out_wkb.c:23
Here is the call graph for this function:
Here is the caller graph for this function: