PostGIS  2.1.10dev-r@@SVN_REVISION@@
static int ptarray_check_geodetic ( const POINTARRAY pa)
static

Definition at line 2652 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().

2653 {
2654  int t;
2655  POINT2D pt;
2656 
2657  assert(pa);
2658 
2659  for (t=0; t<pa->npoints; t++)
2660  {
2661  getPoint2d_p(pa, t, &pt);
2662  /* printf( "%d (%g, %g)\n", t, pt.x, pt.y); */
2663  if ( pt.x < -180.0 || pt.y < -90.0 || pt.x > 180.0 || pt.y > 90.0 )
2664  return LW_FALSE;
2665  }
2666 
2667  return LW_TRUE;
2668 }
int npoints
Definition: liblwgeom.h:327
double x
Definition: liblwgeom.h:284
#define LW_FALSE
Definition: liblwgeom.h:52
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:51
double y
Definition: liblwgeom.h:284
int getPoint2d_p(const POINTARRAY *pa, int n, POINT2D *point)
Definition: lwgeom_api.c:434

Here is the call graph for this function:

Here is the caller graph for this function: