PostGIS  2.3.7dev-r@@SVN_REVISION@@
Datum issimple ( PG_FUNCTION_ARGS  )

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

References dumpnode::geom, gserialized_is_empty(), lwgeom_free(), lwgeom_from_gserialized(), lwgeom_is_simple(), and TRUE.

2784 {
2785  GSERIALIZED *geom;
2786  LWGEOM *lwgeom_in;
2787  int result;
2788 
2789  POSTGIS_DEBUG(2, "issimple called");
2790 
2791  geom = PG_GETARG_GSERIALIZED_P(0);
2792 
2793  if ( gserialized_is_empty(geom) )
2794  PG_RETURN_BOOL(TRUE);
2795 
2796  lwgeom_in = lwgeom_from_gserialized(geom);
2797  result = lwgeom_is_simple(lwgeom_in);
2798  lwgeom_free(lwgeom_in) ;
2799  PG_FREE_IF_COPY(geom, 0);
2800 
2801  if (result == -1) {
2802  PG_RETURN_NULL(); /*never get here */
2803  }
2804 
2805  PG_RETURN_BOOL(result);
2806 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1063
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
Definition: g_serialized.c:153
LWGEOM * geom
int lwgeom_is_simple(const LWGEOM *lwgeom)
#define TRUE
Definition: dbfopen.c:169

Here is the call graph for this function: