PostGIS  2.1.10dev-r@@SVN_REVISION@@
Datum sfcgal_distance3D ( PG_FUNCTION_ARGS  )

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

References POSTGIS2SFCGALGeometry(), result, and sfcgal_postgis_init().

298 {
299  GSERIALIZED *input0, *input1;
300  sfcgal_geometry_t *geom0, *geom1;
301  double result;
302 
304 
305  input0 = (GSERIALIZED*) PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
306  input1 = (GSERIALIZED*) PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
307  geom0 = POSTGIS2SFCGALGeometry(input0);
308  PG_FREE_IF_COPY(input0, 0);
309  geom1 = POSTGIS2SFCGALGeometry(input1);
310  PG_FREE_IF_COPY(input1, 1);
311 
312  result = sfcgal_geometry_distance_3d(geom0, geom1);
313  sfcgal_geometry_delete(geom0);
314  sfcgal_geometry_delete(geom1);
315 
316  PG_RETURN_FLOAT8(result);
317 }
sfcgal_geometry_t * POSTGIS2SFCGALGeometry(GSERIALIZED *pglwgeom)
char ** result
Definition: liblwgeom.h:218
void sfcgal_postgis_init(void)

Here is the call graph for this function: