PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ sfcgal_make_solid()

Datum sfcgal_make_solid ( PG_FUNCTION_ARGS  )

Definition at line 736 of file postgis/lwgeom_sfcgal.c.

References LWGEOM::flags, FLAGS_SET_SOLID, geometry_serialize(), lwerror(), lwgeom_free(), and lwgeom_from_gserialized().

Referenced by sfcgal_is_solid().

737 {
738  GSERIALIZED *output;
739  GSERIALIZED *input = PG_GETARG_GSERIALIZED_P(0);
740  LWGEOM *lwgeom = lwgeom_from_gserialized(input);
741  PG_FREE_IF_COPY(input, 0);
742  if (! lwgeom)
743  {
744  lwerror("sfcgal_make_solid: Unable to deserialize input");
745  }
746 
747  FLAGS_SET_SOLID( lwgeom->flags, 1);
748 
749  output = geometry_serialize( lwgeom );
750  lwgeom_free(lwgeom);
751 
752  PG_RETURN_POINTER(output);
753 }
#define FLAGS_SET_SOLID(flags, value)
Definition: liblwgeom.h:135
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
uint8_t flags
Definition: liblwgeom.h:381
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1050
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74
Here is the call graph for this function:
Here is the caller graph for this function: