PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ issimple()

Datum issimple ( PG_FUNCTION_ARGS  )

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

1738 {
1739  GSERIALIZED *geom;
1740  LWGEOM *lwgeom_in;
1741  int result;
1742 
1743  POSTGIS_DEBUG(2, "issimple called");
1744 
1745  geom = PG_GETARG_GSERIALIZED_P(0);
1746 
1747  if ( gserialized_is_empty(geom) )
1748  PG_RETURN_BOOL(true);
1749 
1750  lwgeom_in = lwgeom_from_gserialized(geom);
1751  result = lwgeom_is_simple(lwgeom_in);
1752  lwgeom_free(lwgeom_in) ;
1753  PG_FREE_IF_COPY(geom, 0);
1754 
1755  if (result == -1) {
1756  PG_RETURN_NULL(); /*never get here */
1757  }
1758 
1759  PG_RETURN_BOOL(result);
1760 }
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:268
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
Definition: gserialized.c:181
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1218
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: