PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ array_nelems_not_null()

uint32_t array_nelems_not_null ( ArrayType *  array)

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

References genraster::value.

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

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