323 struct gserialized_empty_cases {
328 struct gserialized_empty_cases cases[] = {
329 {
"POINT EMPTY", 1 },
331 {
"LINESTRING EMPTY", 1 },
332 {
"MULTILINESTRING EMPTY", 1 },
333 {
"MULTILINESTRING(EMPTY)", 1 },
334 {
"MULTILINESTRING(EMPTY,EMPTY)", 1 },
335 {
"MULTILINESTRING(EMPTY,(0 0,1 1))", 0 },
336 {
"MULTILINESTRING((0 0,1 1),EMPTY)", 0 },
337 {
"MULTILINESTRING(EMPTY,(0 0,1 1),EMPTY)", 0 },
338 {
"MULTILINESTRING(EMPTY,EMPTY,EMPTY)", 1 },
339 {
"GEOMETRYCOLLECTION(POINT EMPTY,MULTILINESTRING(EMPTY,EMPTY,EMPTY))", 1 },
340 {
"GEOMETRYCOLLECTION(POINT EMPTY,MULTILINESTRING(EMPTY),POINT(1 1))", 0 },
341 {
"GEOMETRYCOLLECTION(POINT EMPTY,MULTILINESTRING(EMPTY, (0 0)),POINT EMPTY)", 0 },
342 {
"GEOMETRYCOLLECTION(POLYGON EMPTY,POINT EMPTY,MULTILINESTRING(EMPTY,EMPTY),POINT EMPTY)", 1 },
343 {
"GEOMETRYCOLLECTION(POLYGON EMPTY,GEOMETRYCOLLECTION(POINT EMPTY),MULTILINESTRING(EMPTY,EMPTY),POINT EMPTY)", 1 },
347 while( cases[i].wkt )
354 CU_ASSERT_EQUAL(ie, cases[i].isempty);
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
#define LW_PARSER_CHECK_NONE
GSERIALIZED * gserialized_from_lwgeom(LWGEOM *geom, size_t *size)
Allocate a new GSERIALIZED from an LWGEOM.