PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ ptarray_npoints_in_rect()

int ptarray_npoints_in_rect ( const POINTARRAY pa,
const GBOX gbox 
)

Definition at line 2084 of file ptarray.c.

2085 {
2086  const POINT2D *pt;
2087  int n = 0;
2088  uint32_t i;
2089  for ( i = 0; i < pa->npoints; i++ )
2090  {
2091  pt = getPoint2d_cp(pa, i);
2092  if ( gbox_contains_point2d(gbox, pt) )
2093  n++;
2094  }
2095  return n;
2096 }
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:374
uint32_t npoints
Definition: liblwgeom.h:374
unsigned int uint32_t
Definition: uthash.h:78

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

Here is the call graph for this function: