PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ array_nelems_not_null()

uint32_t array_nelems_not_null ( ArrayType *  array)

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

References genraster::value.

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

2902  {
2903  ArrayIterator iterator;
2904  Datum value;
2905  bool isnull;
2906  uint32_t nelems_not_null = 0;
2907 
2908 #if POSTGIS_PGSQL_VERSION >= 95
2909  iterator = array_create_iterator(array, 0, NULL);
2910 #else
2911  iterator = array_create_iterator(array, 0);
2912 #endif
2913  while(array_iterate(iterator, &value, &isnull) )
2914  {
2915  if (!isnull)
2916  {
2917  nelems_not_null++;
2918  }
2919  }
2920  array_free_iterator(iterator);
2921 
2922  return nelems_not_null;
2923 }
int value
Definition: genraster.py:61
Here is the caller graph for this function: