1584{
1588 GEOSGeom g1;
1589
1590 geom1 = PG_GETARG_GSERIALIZED_P(0);
1591
1592
1594 PG_RETURN_BOOL(true);
1595
1597
1599 if ( ! lwgeom )
1600 {
1601 lwpgerror("unable to deserialize input");
1602 }
1605
1606 if ( ! g1 )
1607 {
1608 PG_RETURN_BOOL(false);
1609 }
1610
1611 result = GEOSisValid(g1);
1612 GEOSGeom_destroy(g1);
1613
1615 {
1616 elog(ERROR,"GEOS isvalid() threw an error!");
1617 PG_RETURN_NULL();
1618 }
1619
1620 PG_FREE_IF_COPY(geom1, 0);
1622}
char result[OUT_DOUBLE_BUFFER_SIZE]
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *lwgeom, uint8_t autofix)
void lwgeom_geos_error(const char *fmt,...)
void lwgeom_free(LWGEOM *geom)