PostGIS  2.3.7dev-r@@SVN_REVISION@@
Datum sfcgal_make_solid ( PG_FUNCTION_ARGS  )

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

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

748 {
749  GSERIALIZED *output;
750  GSERIALIZED *input = PG_GETARG_GSERIALIZED_P(0);
751  LWGEOM *lwgeom = lwgeom_from_gserialized(input);
752  PG_FREE_IF_COPY(input, 0);
753  if (! lwgeom)
754  {
755  lwerror("sfcgal_make_solid: Unable to deserialize input");
756  }
757 
758  FLAGS_SET_SOLID( lwgeom->flags, 1);
759 
760  output = geometry_serialize( lwgeom );
761  lwgeom_free(lwgeom);
762 
763  PG_RETURN_POINTER(output);
764 }
#define FLAGS_SET_SOLID(flags, value)
Definition: liblwgeom.h:150
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
uint8_t flags
Definition: liblwgeom.h:396
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1063
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:102

Here is the call graph for this function: