PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ SFCGALGeometry2POSTGIS()

GSERIALIZED* SFCGALGeometry2POSTGIS ( const sfcgal_geometry_t *  geom,
int  force3D,
int  SRID 
)

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

References geometry_serialize(), LW_TRUE, lwgeom_add_bbox(), lwgeom_free(), lwgeom_needs_bbox(), and SFCGAL2LWGEOM().

Referenced by sfcgal_approximate_medial_axis(), sfcgal_difference(), sfcgal_difference3D(), sfcgal_extrude(), sfcgal_force_lhr(), sfcgal_intersection(), sfcgal_intersection3D(), sfcgal_minkowski_sum(), sfcgal_straight_skeleton(), sfcgal_tesselate(), sfcgal_triangulate(), sfcgal_union(), sfcgal_union3D(), and SFCGALPreparedGeometry2POSTGIS().

117 {
118  GSERIALIZED *result;
119  LWGEOM* lwgeom = SFCGAL2LWGEOM(geom, force3D, SRID);
120 
121  if (lwgeom_needs_bbox(lwgeom) == LW_TRUE)
122  lwgeom_add_bbox(lwgeom);
123 
124  result = geometry_serialize(lwgeom);
125  lwgeom_free(lwgeom);
126 
127  return result;
128 }
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1099
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
void lwgeom_add_bbox(LWGEOM *lwgeom)
Compute a bbox if not already computed.
Definition: lwgeom.c:648
int lwgeom_needs_bbox(const LWGEOM *geom)
Check whether or not a lwgeom is big enough to warrant a bounding box.
Definition: lwgeom.c:1152
LWGEOM * SFCGAL2LWGEOM(const sfcgal_geometry_t *geom, int force3D, int srid)
Here is the call graph for this function:
Here is the caller graph for this function: