PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ ptarray_check_geodetic()

static int ptarray_check_geodetic ( const POINTARRAY pa)
static

Definition at line 3068 of file lwgeodetic.c.

3069 {
3070  uint32_t t;
3071  POINT2D pt;
3072 
3073  assert(pa);
3074 
3075  for (t=0; t<pa->npoints; t++)
3076  {
3077  getPoint2d_p(pa, t, &pt);
3078  /* printf( "%d (%g, %g)\n", t, pt.x, pt.y); */
3079  if ( pt.x < -180.0 || pt.y < -90.0 || pt.x > 180.0 || pt.y > 90.0 )
3080  return LW_FALSE;
3081  }
3082 
3083  return LW_TRUE;
3084 }
#define LW_FALSE
Definition: liblwgeom.h:77
int getPoint2d_p(const POINTARRAY *pa, uint32_t n, POINT2D *point)
Definition: lwgeom_api.c:348
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
double y
Definition: liblwgeom.h:331
double x
Definition: liblwgeom.h:331
uint32_t npoints
Definition: liblwgeom.h:374
unsigned int uint32_t
Definition: uthash.h:78

References getPoint2d_p(), LW_FALSE, LW_TRUE, POINTARRAY::npoints, POINT2D::x, and POINT2D::y.

Referenced by lwline_check_geodetic(), lwpoint_check_geodetic(), lwpoly_check_geodetic(), and lwtriangle_check_geodetic().

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