1220 {
1223 int maxX = 5;
1224 int maxY = 5;
1227 void *vals = NULL;
1228 uint16_t nvals = 0;
1229 int err = 0;
1230
1232 CU_ASSERT(rast != NULL);
1233
1235
1237 CU_ASSERT(band != NULL);
1238
1239 for (y = 0;
y < maxY;
y++) {
1240 for (x = 0;
x < maxX;
x++)
1242 }
1243
1245 CU_ASSERT_EQUAL(err,
ES_NONE);
1246 CU_ASSERT_EQUAL(nvals, maxX);
1247 CU_ASSERT_EQUAL(((int8_t *) vals)[3], 3);
1249
1251 CU_ASSERT_EQUAL(err,
ES_NONE);
1252 CU_ASSERT_EQUAL(nvals, 1);
1253 CU_ASSERT_EQUAL(((int8_t *) vals)[0], 24);
1255
1257 CU_ASSERT_NOT_EQUAL(err,
ES_NONE);
1258
1260}
void rt_raster_set_scale(rt_raster raster, double scaleX, double scaleY)
Set scale in projection units.
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.
void rtdealloc(void *mem)
rt_errorstate rt_band_get_pixel_line(rt_band band, int x, int y, uint16_t len, void **vals, uint16_t *nvals)
Get values of multiple pixels.
rt_band cu_add_band(rt_raster raster, rt_pixtype pixtype, int hasnodata, double nodataval)
void cu_free_raster(rt_raster raster)