PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwgeom_mindistance2d_tolerance()

double lwgeom_mindistance2d_tolerance ( const LWGEOM lw1,
const LWGEOM lw2,
double  tolerance 
)
extern

Function handling min distance calculations and dwithin calculations.

The difference is just the tolerance.

Definition at line 222 of file measures.c.

223{
224 DISTPTS thedl;
225 LWDEBUG(2, "lwgeom_mindistance2d_tolerance is called");
226 thedl.mode = DIST_MIN;
227 thedl.distance = FLT_MAX;
228 thedl.tolerance = tolerance;
229 if (lw_dist2d_comp(lw1, lw2, &thedl))
230 return thedl.distance;
231 /*should never get here. all cases ought to be error handled earlier*/
232 lwerror("Some unspecified error.");
233 return FLT_MAX;
234}
#define LWDEBUG(level, msg)
Definition lwgeom_log.h:101
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
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:251
#define DIST_MIN
Definition measures.h:44
double tolerance
Definition measures.h:56
int mode
Definition measures.h:54
double distance
Definition measures.h:51
Structure used in distance-calculations.
Definition measures.h:50

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

Referenced by LWGEOM_dwithin(), lwgeom_mindistance2d(), lwgeom_mindistance3d_tolerance(), lwt_GetEdgeByPoint(), lwt_GetFaceByPoint(), rt_raster_within_distance(), union_dbscan_general(), and union_dbscan_minpoints_1().

Here is the call graph for this function:
Here is the caller graph for this function: