PostGIS  3.4.0dev-r@@SVN_REVISION@@
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages

◆ ptarray_check_geodetic()

static int ptarray_check_geodetic ( const POINTARRAY pa)
static

Definition at line 3067 of file lwgeodetic.c.

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

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: