PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ issimple()

Datum issimple ( PG_FUNCTION_ARGS  )

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

2570 {
2571  GSERIALIZED *geom;
2572  LWGEOM *lwgeom_in;
2573  int result;
2574 
2575  POSTGIS_DEBUG(2, "issimple called");
2576 
2577  geom = PG_GETARG_GSERIALIZED_P(0);
2578 
2579  if ( gserialized_is_empty(geom) )
2580  PG_RETURN_BOOL(true);
2581 
2582  lwgeom_in = lwgeom_from_gserialized(geom);
2583  result = lwgeom_is_simple(lwgeom_in);
2584  lwgeom_free(lwgeom_in) ;
2585  PG_FREE_IF_COPY(geom, 0);
2586 
2587  if (result == -1) {
2588  PG_RETURN_NULL(); /*never get here */
2589  }
2590 
2591  PG_RETURN_BOOL(result);
2592 }
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.
Definition: g_serialized.c:179
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
int lwgeom_is_simple(const LWGEOM *lwgeom)

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

Here is the call graph for this function: