PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ issimple()

Datum issimple ( PG_FUNCTION_ARGS  )

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

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

Referenced by ST_Equals().

2855 {
2856  GSERIALIZED *geom;
2857  LWGEOM *lwgeom_in;
2858  int result;
2859 
2860  POSTGIS_DEBUG(2, "issimple called");
2861 
2862  geom = PG_GETARG_GSERIALIZED_P(0);
2863 
2864  if ( gserialized_is_empty(geom) )
2865  PG_RETURN_BOOL(TRUE);
2866 
2867  lwgeom_in = lwgeom_from_gserialized(geom);
2868  result = lwgeom_is_simple(lwgeom_in);
2869  lwgeom_free(lwgeom_in) ;
2870  PG_FREE_IF_COPY(geom, 0);
2871 
2872  if (result == -1) {
2873  PG_RETURN_NULL(); /*never get here */
2874  }
2875 
2876  PG_RETURN_BOOL(result);
2877 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
Definition: g_serialized.c:179
LWGEOM * geom
int lwgeom_is_simple(const LWGEOM *lwgeom)
#define TRUE
Definition: dbfopen.c:169
Here is the call graph for this function:
Here is the caller graph for this function: