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

◆ _lwt_minTolerance()

static double _lwt_minTolerance ( LWGEOM g)
static

Definition at line 5161 of file lwgeom_topo.c.

5162{
5163 const GBOX* gbox;
5164 double max;
5165 double ret;
5166
5167 gbox = lwgeom_get_bbox(g);
5168 if ( ! gbox ) return 0; /* empty */
5169 max = FP_ABS(gbox->xmin);
5170 if ( max < FP_ABS(gbox->xmax) ) max = FP_ABS(gbox->xmax);
5171 if ( max < FP_ABS(gbox->ymin) ) max = FP_ABS(gbox->ymin);
5172 if ( max < FP_ABS(gbox->ymax) ) max = FP_ABS(gbox->ymax);
5173
5174 ret = _lwt_minToleranceDouble(max);
5175
5176 return ret;
5177}
const GBOX * lwgeom_get_bbox(const LWGEOM *lwgeom)
Get a non-empty geometry bounding box, computing and caching it if not already there.
Definition lwgeom.c:771
#define FP_ABS(a)
static double _lwt_minToleranceDouble(double d)
double ymax
Definition liblwgeom.h:357
double xmax
Definition liblwgeom.h:355
double ymin
Definition liblwgeom.h:356
double xmin
Definition liblwgeom.h:354

References _lwt_minToleranceDouble(), FP_ABS, lwgeom_get_bbox(), GBOX::xmax, GBOX::xmin, GBOX::ymax, and GBOX::ymin.

Referenced by _lwt_AddLineEdge().

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