PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ array_nelems_not_null()

uint32_t array_nelems_not_null ( ArrayType *  array)

Definition at line 2670 of file postgis/lwgeom_geos.c.

2670  {
2671  ArrayIterator iterator;
2672  Datum value;
2673  bool isnull;
2674  uint32_t nelems_not_null = 0;
2675 
2676 #if POSTGIS_PGSQL_VERSION >= 95
2677  iterator = array_create_iterator(array, 0, NULL);
2678 #else
2679  iterator = array_create_iterator(array, 0);
2680 #endif
2681  while(array_iterate(iterator, &value, &isnull) )
2682  {
2683  if (!isnull)
2684  {
2685  nelems_not_null++;
2686  }
2687  }
2688  array_free_iterator(iterator);
2689 
2690  return nelems_not_null;
2691 }
int value
Definition: genraster.py:61
unsigned int uint32_t
Definition: uthash.h:78

References genraster::value.

Referenced by cluster_within_distance_garray(), clusterintersecting_garray(), and polygonize_garray().

Here is the caller graph for this function: