PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ _lwt_minTolerance()

static double _lwt_minTolerance ( LWGEOM g)
static

Definition at line 5046 of file lwgeom_topo.c.

5047 {
5048  const GBOX* gbox;
5049  double max;
5050  double ret;
5051 
5052  gbox = lwgeom_get_bbox(g);
5053  if ( ! gbox ) return 0; /* empty */
5054  max = FP_ABS(gbox->xmin);
5055  if ( max < FP_ABS(gbox->xmax) ) max = FP_ABS(gbox->xmax);
5056  if ( max < FP_ABS(gbox->ymin) ) max = FP_ABS(gbox->ymin);
5057  if ( max < FP_ABS(gbox->ymax) ) max = FP_ABS(gbox->ymax);
5058 
5059  ret = _lwt_minToleranceDouble(max);
5060 
5061  return ret;
5062 }
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:743
#define FP_ABS(a)
static double _lwt_minToleranceDouble(double d)
Definition: lwgeom_topo.c:5025
double ymax
Definition: liblwgeom.h:372
double xmax
Definition: liblwgeom.h:370
double ymin
Definition: liblwgeom.h:371
double xmin
Definition: liblwgeom.h:369

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: