PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ issimple()

Datum issimple ( PG_FUNCTION_ARGS  )

Definition at line 1738 of file postgis/lwgeom_geos.c.

1739{
1740 GSERIALIZED *geom;
1741 LWGEOM *lwgeom_in;
1742 int result;
1743
1744 POSTGIS_DEBUG(2, "issimple called");
1745
1746 geom = PG_GETARG_GSERIALIZED_P(0);
1747
1748 if ( gserialized_is_empty(geom) )
1749 PG_RETURN_BOOL(true);
1750
1751 lwgeom_in = lwgeom_from_gserialized(geom);
1752 result = lwgeom_is_simple(lwgeom_in);
1753 lwgeom_free(lwgeom_in) ;
1754 PG_FREE_IF_COPY(geom, 0);
1755
1756 if (result == -1) {
1757 PG_RETURN_NULL(); /*never get here */
1758 }
1759
1760 PG_RETURN_BOOL(result);
1761}
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition cu_print.c:267
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.
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246
int lwgeom_is_simple(const LWGEOM *lwgeom)

References gserialized_is_empty(), lwgeom_free(), lwgeom_from_gserialized(), lwgeom_is_simple(), and result.

Here is the call graph for this function: