PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwpoly_pt_outside()

int lwpoly_pt_outside ( const LWPOLY poly,
POINT2D pt_outside 
)

Definition at line 1527 of file lwgeodetic.c.

1528 {
1529  int rv;
1530  /* Make sure we have boxes */
1531  if ( poly->bbox )
1532  {
1533  rv = gbox_pt_outside(poly->bbox, pt_outside);
1534  }
1535  else
1536  {
1537  GBOX gbox;
1538  lwgeom_calculate_gbox_geodetic((LWGEOM*)poly, &gbox);
1539  rv = gbox_pt_outside(&gbox, pt_outside);
1540  }
1541 
1542  if (rv == LW_FALSE)
1543  return lwpoly_pt_outside_hack(poly, pt_outside);
1544 
1545  return rv;
1546 }
#define LW_FALSE
Definition: liblwgeom.h:77
int gbox_pt_outside(const GBOX *gbox, POINT2D *pt_outside)
Given a unit geocentric gbox, return a lon/lat (degrees) coordinate point point that is guaranteed to...
Definition: lwgeodetic.c:1552
int lwgeom_calculate_gbox_geodetic(const LWGEOM *geom, GBOX *gbox)
Calculate the geodetic bounding box for an LWGEOM.
Definition: lwgeodetic.c:3028
static int lwpoly_pt_outside_hack(const LWPOLY *poly, POINT2D *pt_outside)
Definition: lwgeodetic.c:1487
GBOX * bbox
Definition: liblwgeom.h:456

References LWPOLY::bbox, gbox_pt_outside(), LW_FALSE, lwgeom_calculate_gbox_geodetic(), and lwpoly_pt_outside_hack().

Referenced by lwpoly_calculate_circ_tree(), and lwpoly_covers_point2d().

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