PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ sfcgal_intersection3D()

Datum sfcgal_intersection3D ( PG_FUNCTION_ARGS  )

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

330{
331 GSERIALIZED *input0, *input1, *output;
332 sfcgal_geometry_t *geom0, *geom1;
333 sfcgal_geometry_t *result;
334 srid_t srid;
335
337
338 input0 = PG_GETARG_GSERIALIZED_P(0);
339 srid = gserialized_get_srid(input0);
340 input1 = PG_GETARG_GSERIALIZED_P(1);
341 geom0 = POSTGIS2SFCGALGeometry(input0);
342 PG_FREE_IF_COPY(input0, 0);
343 geom1 = POSTGIS2SFCGALGeometry(input1);
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
350 output = SFCGALGeometry2POSTGIS(result, 0, srid);
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)

References gserialized_get_srid(), POSTGIS2SFCGALGeometry(), sfcgal_postgis_init(), and SFCGALGeometry2POSTGIS().

Here is the call graph for this function: