PostGIS  2.5.0dev-r@@SVN_REVISION@@
Datum sfcgal_distance ( PG_FUNCTION_ARGS  )

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

References POSTGIS2SFCGALGeometry(), and sfcgal_postgis_init().

292 {
293  GSERIALIZED *input0, *input1;
294  sfcgal_geometry_t *geom0, *geom1;
295  double result;
296 
298 
299  input0 = PG_GETARG_GSERIALIZED_P(0);
300  input1 = PG_GETARG_GSERIALIZED_P(1);
301  geom0 = POSTGIS2SFCGALGeometry(input0);
302  PG_FREE_IF_COPY(input0, 0);
303  geom1 = POSTGIS2SFCGALGeometry(input1);
304  PG_FREE_IF_COPY(input1, 1);
305 
306  result = sfcgal_geometry_distance(geom0, geom1);
307  sfcgal_geometry_delete(geom0);
308  sfcgal_geometry_delete(geom1);
309 
310  PG_RETURN_FLOAT8(result);
311 }
sfcgal_geometry_t * POSTGIS2SFCGALGeometry(GSERIALIZED *pglwgeom)
void sfcgal_postgis_init(void)

Here is the call graph for this function: