303 struct gserialized_empty_cases {
308 struct gserialized_empty_cases cases[] = {
309 {
"POINT EMPTY", 1 },
311 {
"LINESTRING EMPTY", 1 },
312 {
"MULTILINESTRING EMPTY", 1 },
313 {
"MULTILINESTRING(EMPTY)", 1 },
314 {
"MULTILINESTRING(EMPTY,EMPTY)", 1 },
315 {
"MULTILINESTRING(EMPTY,(0 0,1 1))", 0 },
316 {
"MULTILINESTRING((0 0,1 1),EMPTY)", 0 },
317 {
"MULTILINESTRING(EMPTY,(0 0,1 1),EMPTY)", 0 },
318 {
"MULTILINESTRING(EMPTY,EMPTY,EMPTY)", 1 },
319 {
"GEOMETRYCOLLECTION(POINT EMPTY,MULTILINESTRING(EMPTY,EMPTY,EMPTY))", 1 },
320 {
"GEOMETRYCOLLECTION(POINT EMPTY,MULTILINESTRING(EMPTY),POINT(1 1))", 0 },
321 {
"GEOMETRYCOLLECTION(POINT EMPTY,MULTILINESTRING(EMPTY, (0 0)),POINT EMPTY)", 0 },
322 {
"GEOMETRYCOLLECTION(POLYGON EMPTY,POINT EMPTY,MULTILINESTRING(EMPTY,EMPTY),POINT EMPTY)", 1 },
323 {
"GEOMETRYCOLLECTION(POLYGON EMPTY,GEOMETRYCOLLECTION(POINT EMPTY),MULTILINESTRING(EMPTY,EMPTY),POINT EMPTY)", 1 },
327 while( cases[i].wkt )
334 CU_ASSERT_EQUAL(ie, cases[i].isempty);
int gserialized1_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
GSERIALIZED * gserialized1_from_lwgeom(LWGEOM *geom, size_t *size)
Allocate a new GSERIALIZED from an LWGEOM.
void lwgeom_free(LWGEOM *geom)
#define LW_PARSER_CHECK_NONE
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)