PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ issimple()

Datum issimple ( PG_FUNCTION_ARGS  )

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

2759 {
2760  GSERIALIZED *geom;
2761  LWGEOM *lwgeom_in;
2762  int result;
2763 
2764  POSTGIS_DEBUG(2, "issimple called");
2765 
2766  geom = PG_GETARG_GSERIALIZED_P(0);
2767 
2768  if ( gserialized_is_empty(geom) )
2769  PG_RETURN_BOOL(true);
2770 
2771  lwgeom_in = lwgeom_from_gserialized(geom);
2772  result = lwgeom_is_simple(lwgeom_in);
2773  lwgeom_free(lwgeom_in) ;
2774  PG_FREE_IF_COPY(geom, 0);
2775 
2776  if (result == -1) {
2777  PG_RETURN_NULL(); /*never get here */
2778  }
2779 
2780  PG_RETURN_BOOL(result);
2781 }
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.
Definition: gserialized.c:239
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
Definition: gserialized.c:152
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1138
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: