PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ ptarray_check_geodetic()

static int ptarray_check_geodetic ( const POINTARRAY pa)
static

Definition at line 2980 of file lwgeodetic.c.

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().

2981 {
2982  uint32_t t;
2983  POINT2D pt;
2984 
2985  assert(pa);
2986 
2987  for (t=0; t<pa->npoints; t++)
2988  {
2989  getPoint2d_p(pa, t, &pt);
2990  /* printf( "%d (%g, %g)\n", t, pt.x, pt.y); */
2991  if ( pt.x < -180.0 || pt.y < -90.0 || pt.x > 180.0 || pt.y > 90.0 )
2992  return LW_FALSE;
2993  }
2994 
2995  return LW_TRUE;
2996 }
unsigned int uint32_t
Definition: uthash.h:78
double x
Definition: liblwgeom.h:330
#define LW_FALSE
Definition: liblwgeom.h:76
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:75
double y
Definition: liblwgeom.h:330
int getPoint2d_p(const POINTARRAY *pa, uint32_t n, POINT2D *point)
Definition: lwgeom_api.c:348
uint32_t npoints
Definition: liblwgeom.h:373
Here is the call graph for this function:
Here is the caller graph for this function: