PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ array_nelems_not_null()

uint32_t array_nelems_not_null ( ArrayType *  array)

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

References genraster::value.

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

2865  {
2866  ArrayIterator iterator;
2867  Datum value;
2868  bool isnull;
2869  uint32_t nelems_not_null = 0;
2870 
2871 #if POSTGIS_PGSQL_VERSION >= 95
2872  iterator = array_create_iterator(array, 0, NULL);
2873 #else
2874  iterator = array_create_iterator(array, 0);
2875 #endif
2876  while(array_iterate(iterator, &value, &isnull) )
2877  {
2878  if (!isnull)
2879  {
2880  nelems_not_null++;
2881  }
2882  }
2883  array_free_iterator(iterator);
2884 
2885  return nelems_not_null;
2886 }
unsigned int uint32_t
Definition: uthash.h:78
int value
Definition: genraster.py:61
Here is the caller graph for this function: