PostGIS  2.1.10dev-r@@SVN_REVISION@@
double lwgeom_mindistance3d_tolerance ( LWGEOM lw1,
double  tolerance 

Function handling 3d min distance calculations and dwithin calculations.

The difference is just the tolerance.

Definition at line 164 of file measures3d.c.

References DIST_MIN, DISTPTS3D::distance, lw_dist3d_recursive(), LWDEBUG, lwerror(), MAXFLOAT, DISTPTS3D::mode, and DISTPTS3D::tolerance.

Referenced by intersects3d_dwithin(), LWGEOM_dwithin3d(), and lwgeom_mindistance3d().

165 {
166  DISTPTS3D thedl;
167  LWDEBUG(2, "lwgeom_mindistance3d_tolerance is called");
168  thedl.mode = DIST_MIN;
169  thedl.distance= MAXFLOAT;
170  thedl.tolerance = tolerance;
171  if (lw_dist3d_recursive(lw1, lw2, &thedl))
172  {
173  return thedl.distance;
174  }
175  /*should never get here. all cases ought to be error handled earlier*/
176  lwerror("Some unspecified error.");
177  return MAXFLOAT;
178 }
double distance
Definition: measures3d.h:26
#define DIST_MIN
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
Structure used in distance-calculations.
Definition: measures3d.h:24
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:67
int mode
Definition: measures3d.h:29
int lw_dist3d_recursive(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS3D *dl)
This is a recursive function delivering every possible combinatin of subgeometries.
Definition: measures3d.c:194
double tolerance
Definition: measures3d.h:31
#define MAXFLOAT
Largest float value.

Here is the call graph for this function:

Here is the caller graph for this function: