PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ sfcgal_extrude()

Datum sfcgal_extrude ( PG_FUNCTION_ARGS  )

Definition at line 691 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().

692 {
693  GSERIALIZED *input, *output;
694  sfcgal_geometry_t *geom;
695  sfcgal_geometry_t *result;
696  double dx, dy, dz;
697  srid_t srid;
698 
700 
701  input = PG_GETARG_GSERIALIZED_P(0);
702  srid = gserialized_get_srid(input);
703 
704  geom = POSTGIS2SFCGALGeometry(input);
705  PG_FREE_IF_COPY(input, 0);
706 
707  dx = PG_GETARG_FLOAT8(1);
708  dy = PG_GETARG_FLOAT8(2);
709  dz = PG_GETARG_FLOAT8(3);
710 
711  result = sfcgal_geometry_extrude(geom, dx, dy, dz);
712  sfcgal_geometry_delete(geom);
713 
714  output = SFCGALGeometry2POSTGIS(result, 0, srid);
715  sfcgal_geometry_delete(result);
716 
717  PG_RETURN_POINTER(output);
718 }
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:100
Here is the call graph for this function:
Here is the caller graph for this function: