PostGIS  2.1.10dev-r@@SVN_REVISION@@
double lwgeom_maxdistance3d_tolerance ( LWGEOM lw1,
LWGEOM lw2,
double  tolerance 
)

Function handling 3d max distance calculations and dfyllywithin calculations.

The difference is just the tolerance.

Definition at line 132 of file measures3d.c.

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

Referenced by LWGEOM_dfullywithin3d(), and lwgeom_maxdistance3d().

133 {
134  /*double thedist;*/
135  DISTPTS3D thedl;
136  LWDEBUG(2, "lwgeom_maxdistance3d_tolerance is called");
137  thedl.mode = DIST_MAX;
138  thedl.distance= -1;
139  thedl.tolerance = tolerance;
140  if (lw_dist3d_recursive(lw1, lw2, &thedl))
141  {
142  return thedl.distance;
143  }
144  /*should never get here. all cases ought to be error handled earlier*/
145  lwerror("Some unspecified error.");
146  return -1;
147 }
double distance
Definition: measures3d.h:26
#define DIST_MAX
#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

Here is the call graph for this function:

Here is the caller graph for this function: