PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ sfcgal_make_solid()

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(), lwgeom_free(), and lwgeom_from_gserialized().

Referenced by sfcgal_is_solid().

748 {
749  GSERIALIZED *output;
750  GSERIALIZED *input = PG_GETARG_GSERIALIZED_P(0);
751  LWGEOM *lwgeom = lwgeom_from_gserialized(input);
752  if (! lwgeom)
753  {
754  elog(ERROR, "sfcgal_make_solid: Unable to deserialize input");
755  }
756 
757  FLAGS_SET_SOLID( lwgeom->flags, 1);
758 
759  output = geometry_serialize( lwgeom );
760  lwgeom_free(lwgeom);
761  PG_FREE_IF_COPY(input, 0);
762  PG_RETURN_POINTER(output);
763 }
#define FLAGS_SET_SOLID(flags, value)
Definition: liblwgeom.h:151
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
uint8_t flags
Definition: liblwgeom.h:397
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
Here is the call graph for this function:
Here is the caller graph for this function: