PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ array_nelems_not_null()

uint32_t array_nelems_not_null ( ArrayType *  array)

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

References genraster::value.

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

2973  {
2974  ArrayIterator iterator;
2975  Datum value;
2976  bool isnull;
2977  uint32_t nelems_not_null = 0;
2978 
2979 #if POSTGIS_PGSQL_VERSION >= 95
2980  iterator = array_create_iterator(array, 0, NULL);
2981 #else
2982  iterator = array_create_iterator(array, 0);
2983 #endif
2984  while(array_iterate(iterator, &value, &isnull) )
2985  {
2986  if (!isnull)
2987  {
2988  nelems_not_null++;
2989  }
2990  }
2991  array_free_iterator(iterator);
2992 
2993  return nelems_not_null;
2994 }
unsigned int uint32_t
Definition: uthash.h:78
int value
Definition: genraster.py:61
Here is the caller graph for this function: