223 double count[] = {3, 4, 5};
226 CU_ASSERT(raster != NULL);
228 CU_ASSERT(band != NULL);
231 for (x = 0; x < xmax; x++) {
232 for (y = 0; y < ymax; y++) {
233 rt_band_set_pixel(band, x, y, (((
double) x * y) + (x + y) + (x + y * x)) / (x + y + 1), NULL);
237 CU_ASSERT(vcnts != NULL);
238 CU_ASSERT_NOT_EQUAL(rtn, 0);
242 CU_ASSERT(vcnts != NULL);
243 CU_ASSERT_NOT_EQUAL(rtn, 0);
247 CU_ASSERT(vcnts != NULL);
248 CU_ASSERT_NOT_EQUAL(rtn, 0);
252 CU_ASSERT(vcnts != NULL);
253 CU_ASSERT_NOT_EQUAL(rtn, 0);
257 CU_ASSERT(vcnts != NULL);
258 CU_ASSERT_NOT_EQUAL(rtn, 0);
262 CU_ASSERT(vcnts != NULL);
263 CU_ASSERT_NOT_EQUAL(rtn, 0);
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
rt_errorstate rt_band_set_nodata(rt_band band, double val, int *converted)
Set nodata value.
void cu_free_raster(rt_raster raster)
rt_band cu_add_band(rt_raster raster, rt_pixtype pixtype, int hasnodata, double nodataval)
rt_raster rt_raster_new(uint32_t width, uint32_t height)
Construct a raster with given dimensions.
rt_valuecount rt_band_get_value_count(rt_band band, int exclude_nodata_value, double *search_values, uint32_t search_values_count, double roundto, uint32_t *rtn_total, uint32_t *rtn_count)
Count the number of times provided value(s) occur in the band.
void rtdealloc(void *mem)
rt_errorstate rt_band_set_pixel(rt_band band, int x, int y, double val, int *converted)
Set single pixel's value.