22 LWGEOM *geom, *ret, *tmp, *tmp2;
23 char *exp_wkt, *obt_wkt;
28 CU_ASSERT_FATAL(geom != NULL);
30 CU_ASSERT_FATAL(ret != NULL);
32 exp_wkt =
"POLYGON EMPTY";
41 CU_ASSERT_FATAL(geom != NULL);
43 CU_ASSERT_FATAL(ret != NULL);
45 exp_wkt =
"POINT(10 0)";
54 CU_ASSERT_FATAL(geom != NULL);
56 CU_ASSERT_FATAL(ret != NULL);
58 exp_wkt =
"POINT(0 0)";
67 CU_ASSERT_FATAL(geom != NULL);
69 CU_ASSERT_FATAL(ret != NULL);
71 exp_wkt =
"POINT(0 0)";
78 "LINESTRING(0 0,10 0)",
80 CU_ASSERT_FATAL(geom != NULL);
84 CU_ASSERT_FATAL(ret != NULL);
87 "MULTILINESTRING((0 0,8 0),(-2 0,0 0))",
100 "MULTILINESTRING((-5 -2,0 0),(0 0,10 10))",
102 CU_ASSERT_FATAL(geom != NULL);
106 CU_ASSERT_FATAL(ret != NULL);
121 " ((0 0,10 0,10 10,0 10,0 0),(2 2,4 2,4 4,2 4,2 2)),"
122 " ((0 11,10 11,10 21,0 21,0 11),(2 13,4 13,4 15,2 15,2 13))"
125 CU_ASSERT_FATAL(geom != NULL);
129 CU_ASSERT_FATAL(ret != NULL);
133 "((22 0,20 0,20 10,22 10,22 4,22 2,22 0)),"
134 "((2 10,10 10,10 0,2 0,2 2,4 2,4 4,2 4,2 10))"
137 "((22 11,20 11,20 21,22 21,22 15,22 13,22 11)),"
138 "((2 21,10 21,10 11,2 11,2 13,4 13,4 15,2 15,2 21))"
153 "GEOMETRYCOLLECTION("
154 " MULTILINESTRING((-5 -2,0 0),(0 0,10 10)),"
159 CU_ASSERT_FATAL(geom != NULL);
163 CU_ASSERT_FATAL(ret != NULL);
166 "GEOMETRYCOLLECTION("
167 "MULTILINESTRING((15 -2,20 0),(0 0,10 10)),"
#define ASSERT_STRING_EQUAL(o, e)
void lwgeom_free(LWGEOM *geom)
#define LW_PARSER_CHECK_NONE
char * lwgeom_to_ewkt(const LWGEOM *lwgeom)
Return an alloced string.
LWGEOM * lwgeom_normalize(const LWGEOM *geom)
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
LWGEOM * lwgeom_wrapx(const LWGEOM *lwgeom, double cutx, double amount)
wrap geometry on given cut x value