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

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

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

3095 {
3096  GSERIALIZED *geom;
3097  LWGEOM *lwgeom_in;
3098  int result;
3099 
3100  POSTGIS_DEBUG(2, "issimple called");
3101 
3102  geom = PG_GETARG_GSERIALIZED_P(0);
3103 
3104  if ( gserialized_is_empty(geom) )
3105  PG_RETURN_BOOL(TRUE);
3106 
3107  lwgeom_in = lwgeom_from_gserialized(geom);
3108  result = lwgeom_is_simple(lwgeom_in);
3109  lwgeom_free(lwgeom_in) ;
3110  PG_FREE_IF_COPY(geom, 0);
3111 
3112  if (result == -1) {
3113  PG_RETURN_NULL(); /*never get here */
3114  }
3115 
3116  PG_RETURN_BOOL(result);
3117 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1050
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
Definition: g_serialized.c:139
LWGEOM * geom
int lwgeom_is_simple(const LWGEOM *lwgeom)
#define TRUE
Definition: dbfopen.c:169

Here is the call graph for this function: