PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ issimple()

Datum issimple ( PG_FUNCTION_ARGS  )

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

2773 {
2774  GSERIALIZED *geom;
2775  LWGEOM *lwgeom_in;
2776  int result;
2777 
2778  POSTGIS_DEBUG(2, "issimple called");
2779 
2780  geom = PG_GETARG_GSERIALIZED_P(0);
2781 
2782  if ( gserialized_is_empty(geom) )
2783  PG_RETURN_BOOL(true);
2784 
2785  lwgeom_in = lwgeom_from_gserialized(geom);
2786  result = lwgeom_is_simple(lwgeom_in);
2787  lwgeom_free(lwgeom_in) ;
2788  PG_FREE_IF_COPY(geom, 0);
2789 
2790  if (result == -1) {
2791  PG_RETURN_NULL(); /*never get here */
2792  }
2793 
2794  PG_RETURN_BOOL(result);
2795 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262
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:1155
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: