330{
332 sfcgal_geometry_t *geom0, *geom1;
333 sfcgal_geometry_t *result;
334 srid_t srid;
335
337
338 input0 = PG_GETARG_GSERIALIZED_P(0);
340 input1 = PG_GETARG_GSERIALIZED_P(1);
342 PG_FREE_IF_COPY(input0, 0);
344 PG_FREE_IF_COPY(input1, 1);
345
346 result = sfcgal_geometry_intersection_3d(geom0, geom1);
347 sfcgal_geometry_delete(geom0);
348 sfcgal_geometry_delete(geom1);
349
351 sfcgal_geometry_delete(result);
352
353 PG_RETURN_POINTER(output);
354}
int32_t gserialized_get_srid(const GSERIALIZED *g)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
sfcgal_geometry_t * POSTGIS2SFCGALGeometry(GSERIALIZED *pglwgeom)
GSERIALIZED * SFCGALGeometry2POSTGIS(const sfcgal_geometry_t *geom, int force3D, int32_t SRID)
void sfcgal_postgis_init(void)