PostGIS  2.5.0dev-r@@SVN_REVISION@@
int ptarray_npoints_in_rect ( const POINTARRAY pa,
const GBOX gbox 
)

Definition at line 1941 of file ptarray.c.

References gbox_contains_point2d(), getPoint2d_cp(), and POINTARRAY::npoints.

1942 {
1943  const POINT2D *pt;
1944  int n = 0;
1945  uint32_t i;
1946  for ( i = 0; i < pa->npoints; i++ )
1947  {
1948  pt = getPoint2d_cp(pa, i);
1949  if ( gbox_contains_point2d(gbox, pt) )
1950  n++;
1951  }
1952  return n;
1953 }
unsigned int uint32_t
Definition: uthash.h:78
int gbox_contains_point2d(const GBOX *g, const POINT2D *p)
Definition: g_box.c:357
const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from...
Definition: lwgeom_api.c:364
uint32_t npoints
Definition: liblwgeom.h:370

Here is the call graph for this function: