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

Function handling max distance calculations and dfyllywithin calculations.

The difference is just the tolerance.

Definition at line 141 of file measures.c.

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

Referenced by LWGEOM_dfullywithin(), lwgeom_maxdistance2d(), and rt_raster_fully_within_distance().

142 {
143  /*double thedist;*/
144  DISTPTS thedl;
145  LWDEBUG(2, "lwgeom_maxdistance2d_tolerance is called");
146  thedl.mode = DIST_MAX;
147  thedl.distance= -1;
148  thedl.tolerance = tolerance;
149  if (lw_dist2d_comp( lw1,lw2,&thedl))
150  {
151  return thedl.distance;
152  }
153  /*should never get here. all cases ought to be error handled earlier*/
154  lwerror("Some unspecified error.");
155  return -1;
156 }
int lw_dist2d_comp(LWGEOM *lw1, LWGEOM *lw2, DISTPTS *dl)
This function just deserializes geometries Bboxes is not checked here since it is the subgeometries b...
Definition: measures.c:205
#define DIST_MAX
int mode
Definition: measures.h:26
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:67
double tolerance
Definition: measures.h:28
double distance
Definition: measures.h:23
Structure used in distance-calculations.
Definition: measures.h:21

Here is the call graph for this function:

Here is the caller graph for this function: