PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ sfcgal_extrude()

Datum sfcgal_extrude ( PG_FUNCTION_ARGS  )

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

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

Referenced by sfcgal_minkowski_sum().

681 {
682  GSERIALIZED *input, *output;
683  sfcgal_geometry_t *geom;
684  sfcgal_geometry_t *result;
685  double dx, dy, dz;
686  srid_t srid;
687 
689 
690  input = PG_GETARG_GSERIALIZED_P(0);
691  srid = gserialized_get_srid(input);
692 
693  geom = POSTGIS2SFCGALGeometry(input);
694  PG_FREE_IF_COPY(input, 0);
695 
696  dx = PG_GETARG_FLOAT8(1);
697  dy = PG_GETARG_FLOAT8(2);
698  dz = PG_GETARG_FLOAT8(3);
699 
700  result = sfcgal_geometry_extrude(geom, dx, dy, dz);
701  sfcgal_geometry_delete(geom);
702 
703  output = SFCGALGeometry2POSTGIS(result, 0, srid);
704  sfcgal_geometry_delete(result);
705 
706  PG_RETURN_POINTER(output);
707 }
sfcgal_geometry_t * POSTGIS2SFCGALGeometry(GSERIALIZED *pglwgeom)
GSERIALIZED * SFCGALGeometry2POSTGIS(const sfcgal_geometry_t *geom, int force3D, int SRID)
void sfcgal_postgis_init(void)
int32_t gserialized_get_srid(const GSERIALIZED *s)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
Definition: g_serialized.c:69
Here is the call graph for this function:
Here is the caller graph for this function: