PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ _lwt_minTolerance()

static double _lwt_minTolerance ( LWGEOM g)
static

Definition at line 4924 of file lwgeom_topo.c.

4925 {
4926  const GBOX* gbox;
4927  double max;
4928  double ret;
4929 
4930  gbox = lwgeom_get_bbox(g);
4931  if ( ! gbox ) return 0; /* empty */
4932  max = FP_ABS(gbox->xmin);
4933  if ( max < FP_ABS(gbox->xmax) ) max = FP_ABS(gbox->xmax);
4934  if ( max < FP_ABS(gbox->ymin) ) max = FP_ABS(gbox->ymin);
4935  if ( max < FP_ABS(gbox->ymax) ) max = FP_ABS(gbox->ymax);
4936 
4937  ret = _lwt_minToleranceDouble(max);
4938 
4939  return ret;
4940 }
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:726
#define FP_ABS(a)
static double _lwt_minToleranceDouble(double d)
Definition: lwgeom_topo.c:4903
double ymax
Definition: liblwgeom.h:371
double xmax
Definition: liblwgeom.h:369
double ymin
Definition: liblwgeom.h:370
double xmin
Definition: liblwgeom.h:368

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: