95 LWGEOM *geom, *blade, *ret, *tmp1, *tmp2;
99 CU_ASSERT(geom != NULL);
101 CU_ASSERT(blade != NULL);
103 CU_ASSERT(ret != NULL);
105 in_wkt =
"GEOMETRYCOLLECTION(LINESTRING(-5 -2,0 0),LINESTRING(0 0,10 10))";
114 CU_ASSERT(geom != NULL);
117 CU_ASSERT(ret != NULL);
119 in_wkt =
"GEOMETRYCOLLECTION(LINESTRING(0 0,10 0),LINESTRING(10 0,20 4,0 3))";
128 CU_ASSERT(geom != NULL);
131 CU_ASSERT(ret != NULL);
133 in_wkt =
"SRID=1;GEOMETRYCOLLECTION(LINESTRING(0 1,7 1),LINESTRING(7 1,10 1))";
142 CU_ASSERT(geom != NULL);
147 CU_ASSERT(ret != NULL);
150 "SRID=1;GEOMETRYCOLLECTION(POLYGON((7 1,0 1,0 10,7 10,7 1)),POLYGON((7 10,10 10,10 1,7 1,7 10)))",
165 CU_ASSERT_FATAL(geom != NULL);
170 CU_ASSERT_FATAL(ret != NULL);
172 CU_ASSERT_FATAL(wkt != NULL);
173 in_wkt =
"GEOMETRYCOLLECTION(LINESTRING(0 0,1 0),LINESTRING(1 0,2 0),LINESTRING(2 0,3 0),LINESTRING(3 0,10 0))";
182 CU_ASSERT_FATAL(geom != NULL);
187 CU_ASSERT_FATAL(ret != NULL);
189 CU_ASSERT_FATAL(wkt != NULL);
190 in_wkt =
"GEOMETRYCOLLECTION(LINESTRING(0 0,1 0),LINESTRING(1 0,2 0),LINESTRING(2 0,3 0),LINESTRING(3 0,10 0))";
199 CU_ASSERT_FATAL(geom != NULL);
204 CU_ASSERT_FATAL(ret != NULL);
206 CU_ASSERT_FATAL(wkt != NULL);
207 in_wkt =
"GEOMETRYCOLLECTION(LINESTRING(0 0,10 0))";
216 CU_ASSERT_FATAL(geom != NULL);
217 blade =
lwgeom_from_wkt(
"MULTIPOLYGON(((1 -1,1 1,2 1,2 -1,1 -1)),((3 -1,3 1,11 1,11 -1,3 -1)))",
222 CU_ASSERT_FATAL(ret != NULL);
224 CU_ASSERT_FATAL(wkt != NULL);
225 in_wkt =
"GEOMETRYCOLLECTION(LINESTRING(0 0,1 0),LINESTRING(1 0,2 0),LINESTRING(2 0,3 0),LINESTRING(3 0,10 0))";
234 CU_ASSERT_FATAL(geom != NULL);
239 CU_ASSERT_FATAL(ret != NULL);
241 CU_ASSERT_FATAL(wkt != NULL);
242 in_wkt =
"GEOMETRYCOLLECTION(LINESTRING(8 0,10 0),LINESTRING(0 0,2 0),LINESTRING(4 0,8 0),LINESTRING(2 0,4 0))";
251 CU_ASSERT(geom != NULL);
254 CU_ASSERT(ret != NULL);
259 CU_ASSERT(split != NULL);
261 CU_ASSERT(l1 != NULL);
266 CU_ASSERT(l2 != NULL);
char cu_error_msg[MAX_CUNIT_ERROR_LENGTH+1]
#define ASSERT_DOUBLE_EQUAL(o, e)
#define ASSERT_STRING_EQUAL(o, e)
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
void lwgeom_free(LWGEOM *geom)
#define LW_PARSER_CHECK_NONE
LWGEOM * lwgeom_split(const LWGEOM *lwgeom_in, const LWGEOM *blade_in)
int getPoint2d_p(const POINTARRAY *pa, uint32_t n, POINT2D *point)
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)
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)