PostGIS  2.2.7dev-r@@SVN_REVISION@@
double lwgeom_mindistance2d_tolerance ( const LWGEOM lw1,
const LWGEOM lw2,
double  tolerance 
)

Function handling min distance calculations and dwithin calculations.

The difference is just the tolerance.

Definition at line 199 of file measures.c.

References DIST_MIN, DISTPTS::distance, lw_dist2d_comp(), LWDEBUG, lwerror(), DISTPTS::mode, and DISTPTS::tolerance.

Referenced by do_test_mindistance2d_tolerance(), LWGEOM_dwithin(), lwgeom_mindistance2d(), lwgeom_mindistance3d_tolerance(), lwt_GetEdgeByPoint(), lwt_GetFaceByPoint(), rt_raster_within_distance(), and union_if_dwithin().

200 {
201  DISTPTS thedl;
202  LWDEBUG(2, "lwgeom_mindistance2d_tolerance is called");
203  thedl.mode = DIST_MIN;
204  thedl.distance= FLT_MAX;
205  thedl.tolerance = tolerance;
206  if (lw_dist2d_comp( lw1,lw2,&thedl))
207  {
208  return thedl.distance;
209  }
210  /*should never get here. all cases ought to be error handled earlier*/
211  lwerror("Some unspecified error.");
212  return FLT_MAX;
213 }
int lw_dist2d_comp(const LWGEOM *lw1, const LWGEOM *lw2, DISTPTS *dl)
This function just deserializes geometries Bboxes is not checked here since it is the subgeometries b...
Definition: measures.c:231
int mode
Definition: measures.h:27
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
double tolerance
Definition: measures.h:29
#define DIST_MIN
Definition: measures.h:17
double distance
Definition: measures.h:24
Structure used in distance-calculations.
Definition: measures.h:22
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74

Here is the call graph for this function:

Here is the caller graph for this function: