43 CU_ASSERT(
rast != NULL);
46 CU_ASSERT(
band != NULL);
48 for (
x = 0;
x < maxX;
x++) {
49 for (
y = 0;
y < maxY;
y++) {
80 CU_ASSERT_EQUAL(rtn, 3);
92 CU_ASSERT_EQUAL(rtn, 6);
104 CU_ASSERT_EQUAL(rtn, 7);
116 CU_ASSERT_EQUAL(rtn, 19);
128 CU_ASSERT_EQUAL(rtn, 1);
140 CU_ASSERT_EQUAL(rtn, 0);
152 CU_ASSERT_EQUAL(rtn, 3);
164 CU_ASSERT_EQUAL(rtn, 0);
176 CU_ASSERT_EQUAL(rtn, 2);
188 CU_ASSERT_EQUAL(dimx, 3);
189 CU_ASSERT_EQUAL(dimy, 3);
191 for (
x = 0;
x < dimx;
x++) {
207 CU_ASSERT_EQUAL(rtn, 0);
219 CU_ASSERT_EQUAL(rtn, 0);
231 CU_ASSERT_EQUAL(rtn, 48);
243 CU_ASSERT_EQUAL(rtn, 27);
255 CU_ASSERT_EQUAL(rtn, 13);
267 CU_ASSERT_EQUAL(rtn, 3);
273 CU_ASSERT(
band != NULL);
283 CU_ASSERT_EQUAL(rtn, 8);
rt_raster rt_raster_new(uint32_t width, uint32_t height)
Construct a raster with given dimensions.
rt_errorstate rt_band_set_pixel(rt_band band, int x, int y, double val, int *converted)
Set single pixel's value.
rt_errorstate rt_pixel_set_to_array(rt_pixel npixel, uint32_t count, rt_mask mask, int x, int y, uint16_t distancex, uint16_t distancey, double ***value, int ***nodata, int *dimx, int *dimy)
uint32_t rt_band_get_nearest_pixel(rt_band band, int x, int y, uint16_t distancex, uint16_t distancey, int exclude_nodata_value, rt_pixel *npixels)
Get nearest pixel(s) with value (not NODATA) to specified pixel.
void rtdealloc(void *mem)
rt_band cu_add_band(rt_raster raster, rt_pixtype pixtype, int hasnodata, double nodataval)
void cu_free_raster(rt_raster raster)