PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ sfcgal_distance3D()

Datum sfcgal_distance3D ( PG_FUNCTION_ARGS  )

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

References PG_FUNCTION_INFO_V1(), POSTGIS2SFCGALGeometry(), sfcgal_postgis_init(), and sfcgal_tesselate().

Referenced by sfcgal_distance().

316 {
317  GSERIALIZED *input0, *input1;
318  sfcgal_geometry_t *geom0, *geom1;
319  double result;
320 
322 
323  input0 = PG_GETARG_GSERIALIZED_P(0);
324  input1 = PG_GETARG_GSERIALIZED_P(1);
325  geom0 = POSTGIS2SFCGALGeometry(input0);
326  PG_FREE_IF_COPY(input0, 0);
327  geom1 = POSTGIS2SFCGALGeometry(input1);
328  PG_FREE_IF_COPY(input1, 1);
329 
330  result = sfcgal_geometry_distance_3d(geom0, geom1);
331  sfcgal_geometry_delete(geom0);
332  sfcgal_geometry_delete(geom1);
333 
334  PG_RETURN_FLOAT8(result);
335 }
sfcgal_geometry_t * POSTGIS2SFCGALGeometry(GSERIALIZED *pglwgeom)
void sfcgal_postgis_init(void)
Here is the call graph for this function:
Here is the caller graph for this function: