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

◆ sfcgal_extrude()

Datum sfcgal_extrude ( PG_FUNCTION_ARGS  )

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

462{
463 GSERIALIZED *input, *output;
464 sfcgal_geometry_t *geom;
465 sfcgal_geometry_t *result;
466 double dx, dy, dz;
467 srid_t srid;
468
470
471 input = PG_GETARG_GSERIALIZED_P(0);
472 srid = gserialized_get_srid(input);
473
474 geom = POSTGIS2SFCGALGeometry(input);
475 PG_FREE_IF_COPY(input, 0);
476
477 dx = PG_GETARG_FLOAT8(1);
478 dy = PG_GETARG_FLOAT8(2);
479 dz = PG_GETARG_FLOAT8(3);
480
481 result = sfcgal_geometry_extrude(geom, dx, dy, dz);
482 sfcgal_geometry_delete(geom);
483
484 output = SFCGALGeometry2POSTGIS(result, 0, srid);
485 sfcgal_geometry_delete(result);
486
487 PG_RETURN_POINTER(output);
488}
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: