PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwgeom_maxdistance2d_tolerance()

double lwgeom_maxdistance2d_tolerance ( const LWGEOM lw1,
const LWGEOM lw2,
double  tolerance 
)

Function handling max distance calculations and dfyllywithin calculations.

The difference is just the tolerance.

Definition at line 167 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(), lwgeom_maxdistance3d_tolerance(), and rt_raster_fully_within_distance().

168 {
169  /*double thedist;*/
170  DISTPTS thedl;
171  LWDEBUG(2, "lwgeom_maxdistance2d_tolerance is called");
172  thedl.mode = DIST_MAX;
173  thedl.distance= -1;
174  thedl.tolerance = tolerance;
175  if (lw_dist2d_comp( lw1,lw2,&thedl))
176  {
177  return thedl.distance;
178  }
179  /*should never get here. all cases ought to be error handled earlier*/
180  lwerror("Some unspecified error.");
181  return -1;
182 }
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
double distance
Definition: measures.h:24
#define DIST_MAX
Definition: measures.h:16
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: