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

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

References POSTGIS2SFCGALGeometry(), and sfcgal_postgis_init().

281 {
282  GSERIALIZED *input0, *input1;
283  sfcgal_geometry_t *geom0, *geom1;
284  double result;
285 
287 
288  input0 = PG_GETARG_GSERIALIZED_P(0);
289  input1 = PG_GETARG_GSERIALIZED_P(1);
290  geom0 = POSTGIS2SFCGALGeometry(input0);
291  PG_FREE_IF_COPY(input0, 0);
292  geom1 = POSTGIS2SFCGALGeometry(input1);
293  PG_FREE_IF_COPY(input1, 1);
294 
295  result = sfcgal_geometry_distance(geom0, geom1);
296  sfcgal_geometry_delete(geom0);
297  sfcgal_geometry_delete(geom1);
298 
299  PG_RETURN_FLOAT8(result);
300 }
sfcgal_geometry_t * POSTGIS2SFCGALGeometry(GSERIALIZED *pglwgeom)
void sfcgal_postgis_init(void)

Here is the call graph for this function: