PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ sfcgal_distance()

Datum sfcgal_distance ( PG_FUNCTION_ARGS  )

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

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

References POSTGIS2SFCGALGeometry(), and sfcgal_postgis_init().

Here is the call graph for this function: