PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ _lwt_minTolerance()

static double _lwt_minTolerance ( LWGEOM g)
static

Definition at line 4870 of file lwgeom_topo.c.

4871 {
4872  const GBOX* gbox;
4873  double max;
4874  double ret;
4875 
4876  gbox = lwgeom_get_bbox(g);
4877  if ( ! gbox ) return 0; /* empty */
4878  max = FP_ABS(gbox->xmin);
4879  if ( max < FP_ABS(gbox->xmax) ) max = FP_ABS(gbox->xmax);
4880  if ( max < FP_ABS(gbox->ymin) ) max = FP_ABS(gbox->ymin);
4881  if ( max < FP_ABS(gbox->ymax) ) max = FP_ABS(gbox->ymax);
4882 
4883  ret = _lwt_minToleranceDouble(max);
4884 
4885  return ret;
4886 }
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)
Definition: lwgeom_topo.c:4849
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: