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

◆ _lwt_minTolerance()

static double _lwt_minTolerance ( LWGEOM g)
static

Definition at line 4872 of file lwgeom_topo.c.

4873{
4874 const GBOX* gbox;
4875 double max;
4876 double ret;
4877
4878 gbox = lwgeom_get_bbox(g);
4879 if ( ! gbox ) return 0; /* empty */
4880 max = FP_ABS(gbox->xmin);
4881 if ( max < FP_ABS(gbox->xmax) ) max = FP_ABS(gbox->xmax);
4882 if ( max < FP_ABS(gbox->ymin) ) max = FP_ABS(gbox->ymin);
4883 if ( max < FP_ABS(gbox->ymax) ) max = FP_ABS(gbox->ymax);
4884
4885 ret = _lwt_minToleranceDouble(max);
4886
4887 return ret;
4888}
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:725
#define FP_ABS(a)
static double _lwt_minToleranceDouble(double d)
double ymax
Definition liblwgeom.h:343
double xmax
Definition liblwgeom.h:341
double ymin
Definition liblwgeom.h:342
double xmin
Definition liblwgeom.h:340

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

Referenced by _lwt_AddLineEdge(), and _lwt_AddPoint().

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