PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ sfcgal_make_solid()

Datum sfcgal_make_solid ( PG_FUNCTION_ARGS  )

Definition at line 748 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().

749 {
750  GSERIALIZED *output;
751  GSERIALIZED *input = PG_GETARG_GSERIALIZED_P(0);
752  LWGEOM *lwgeom = lwgeom_from_gserialized(input);
753  if (! lwgeom)
754  {
755  elog(ERROR, "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  PG_FREE_IF_COPY(input, 0);
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:399
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
Here is the call graph for this function:
Here is the caller graph for this function: