int x, y;
for (x = 0; x < rt_band_get_width(band); ++x)
for (y = 0; y < rt_band_get_height(band); ++y)
- rt_band_set_pixel(band, x, y, 0.0);
+ rt_band_set_pixel(band, x, y, 0.0, NULL);
}
- rt_band_set_pixel(band, 3, 1, 1.8);
- rt_band_set_pixel(band, 4, 1, 1.8);
- rt_band_set_pixel(band, 5, 1, 2.8);
- rt_band_set_pixel(band, 2, 2, 1.8);
- rt_band_set_pixel(band, 3, 2, 1.8);
- rt_band_set_pixel(band, 4, 2, 1.8);
- rt_band_set_pixel(band, 5, 2, 2.8);
- rt_band_set_pixel(band, 6, 2, 2.8);
- rt_band_set_pixel(band, 1, 3, 1.8);
- rt_band_set_pixel(band, 2, 3, 1.8);
- rt_band_set_pixel(band, 6, 3, 2.8);
- rt_band_set_pixel(band, 7, 3, 2.8);
- rt_band_set_pixel(band, 1, 4, 1.8);
- rt_band_set_pixel(band, 2, 4, 1.8);
- rt_band_set_pixel(band, 6, 4, 2.8);
- rt_band_set_pixel(band, 7, 4, 2.8);
- rt_band_set_pixel(band, 1, 5, 1.8);
- rt_band_set_pixel(band, 2, 5, 1.8);
- rt_band_set_pixel(band, 6, 5, 2.8);
- rt_band_set_pixel(band, 7, 5, 2.8);
- rt_band_set_pixel(band, 2, 6, 1.8);
- rt_band_set_pixel(band, 3, 6, 1.8);
- rt_band_set_pixel(band, 4, 6, 1.8);
- rt_band_set_pixel(band, 5, 6, 2.8);
- rt_band_set_pixel(band, 6, 6, 2.8);
- rt_band_set_pixel(band, 3, 7, 1.8);
- rt_band_set_pixel(band, 4, 7, 1.8);
- rt_band_set_pixel(band, 5, 7, 2.8);
+ rt_band_set_pixel(band, 3, 1, 1.8, NULL);
+ rt_band_set_pixel(band, 4, 1, 1.8, NULL);
+ rt_band_set_pixel(band, 5, 1, 2.8, NULL);
+ rt_band_set_pixel(band, 2, 2, 1.8, NULL);
+ rt_band_set_pixel(band, 3, 2, 1.8, NULL);
+ rt_band_set_pixel(band, 4, 2, 1.8, NULL);
+ rt_band_set_pixel(band, 5, 2, 2.8, NULL);
+ rt_band_set_pixel(band, 6, 2, 2.8, NULL);
+ rt_band_set_pixel(band, 1, 3, 1.8, NULL);
+ rt_band_set_pixel(band, 2, 3, 1.8, NULL);
+ rt_band_set_pixel(band, 6, 3, 2.8, NULL);
+ rt_band_set_pixel(band, 7, 3, 2.8, NULL);
+ rt_band_set_pixel(band, 1, 4, 1.8, NULL);
+ rt_band_set_pixel(band, 2, 4, 1.8, NULL);
+ rt_band_set_pixel(band, 6, 4, 2.8, NULL);
+ rt_band_set_pixel(band, 7, 4, 2.8, NULL);
+ rt_band_set_pixel(band, 1, 5, 1.8, NULL);
+ rt_band_set_pixel(band, 2, 5, 1.8, NULL);
+ rt_band_set_pixel(band, 6, 5, 2.8, NULL);
+ rt_band_set_pixel(band, 7, 5, 2.8, NULL);
+ rt_band_set_pixel(band, 2, 6, 1.8, NULL);
+ rt_band_set_pixel(band, 3, 6, 1.8, NULL);
+ rt_band_set_pixel(band, 4, 6, 1.8, NULL);
+ rt_band_set_pixel(band, 5, 6, 2.8, NULL);
+ rt_band_set_pixel(band, 6, 6, 2.8, NULL);
+ rt_band_set_pixel(band, 3, 7, 1.8, NULL);
+ rt_band_set_pixel(band, 4, 7, 1.8, NULL);
+ rt_band_set_pixel(band, 5, 7, 2.8, NULL);
return raster;
}
static void testBand1BB(rt_band band)
{
int failure;
+ int clamped;
double val = 0;
- failure = rt_band_set_nodata(band, 1);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 1, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_nodata(band, 0);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 0, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_nodata(band, 2);
- CHECK(failure); /* out of range value */
+ failure = rt_band_set_nodata(band, 2, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
- failure = rt_band_set_nodata(band, 3);
- CHECK(failure); /* out of range value */
+ failure = rt_band_set_nodata(band, 3, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
- failure = rt_band_set_pixel(band, 0, 0, 2);
- CHECK(failure); /* out of range value */
+ failure = rt_band_set_pixel(band, 0, 0, 2, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
- failure = rt_band_set_pixel(band, 0, 0, 3);
- CHECK(failure); /* out of range value */
+ failure = rt_band_set_pixel(band, 0, 0, 3, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
{
int x, y;
{
for (y=0; y<rt_band_get_height(band); ++y)
{
- failure = rt_band_set_pixel(band, x, y, 1);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_pixel(band, x, y, 0);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 0, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 0);
}
{
double val;
int failure;
+ int clamped;
- failure = rt_band_set_nodata(band, 1);
+ failure = rt_band_set_nodata(band, 1, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 1);
- CHECK(!failure);
- failure = rt_band_set_nodata(band, 0);
+ failure = rt_band_set_nodata(band, 0, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 0);
- CHECK(!failure);
- failure = rt_band_set_nodata(band, 2);
+ failure = rt_band_set_nodata(band, 2, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 2);
- CHECK(!failure);
- failure = rt_band_set_nodata(band, 3);
+ failure = rt_band_set_nodata(band, 3, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 3);
- CHECK(!failure);
- failure = rt_band_set_nodata(band, 4); /* invalid: out of range */
- CHECK(failure);
+ failure = rt_band_set_nodata(band, 4, &clamped); /* invalid: out of range */
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
- failure = rt_band_set_nodata(band, 5); /* invalid: out of range */
- CHECK(failure);
+ failure = rt_band_set_nodata(band, 5, &clamped); /* invalid: out of range */
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
- failure = rt_band_set_pixel(band, 0, 0, 4); /* out of range */
- CHECK(failure);
+ failure = rt_band_set_pixel(band, 0, 0, 4, &clamped); /* out of range */
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
- failure = rt_band_set_pixel(band, 0, 0, 5); /* out of range */
- CHECK(failure);
+ failure = rt_band_set_pixel(band, 0, 0, 5, &clamped); /* out of range */
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
{
{
for (y=0; y<rt_band_get_height(band); ++y)
{
- failure = rt_band_set_pixel(band, x, y, 1);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_pixel(band, x, y, 2);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 2, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 2);
- failure = rt_band_set_pixel(band, x, y, 3);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 3, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 3);
}
}
{
double val;
int failure;
+ int clamped;
- failure = rt_band_set_nodata(band, 1);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 1, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_nodata(band, 0);
+ failure = rt_band_set_nodata(band, 0, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
- CHECK(!failure);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_nodata(band, 2);
+ failure = rt_band_set_nodata(band, 2, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
- CHECK(!failure);
CHECK_EQUALS(val, 2);
- failure = rt_band_set_nodata(band, 4);
+ failure = rt_band_set_nodata(band, 4, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
- CHECK(!failure);
CHECK_EQUALS(val, 4);
- failure = rt_band_set_nodata(band, 8);
+ failure = rt_band_set_nodata(band, 8, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
- CHECK(!failure);
CHECK_EQUALS(val, 8);
- failure = rt_band_set_nodata(band, 15);
+ failure = rt_band_set_nodata(band, 15, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
- CHECK(!failure);
CHECK_EQUALS(val, 15);
- failure = rt_band_set_nodata(band, 16); /* out of value range */
- CHECK(failure);
+ failure = rt_band_set_nodata(band, 16, &clamped); /* out of value range */
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
- failure = rt_band_set_nodata(band, 17); /* out of value range */
- CHECK(failure);
+ failure = rt_band_set_nodata(band, 17, &clamped); /* out of value range */
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
- failure = rt_band_set_pixel(band, 0, 0, 35); /* out of value range */
- CHECK(failure);
+ failure = rt_band_set_pixel(band, 0, 0, 35, &clamped); /* out of value range */
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
{
{
for (y=0; y<rt_band_get_height(band); ++y)
{
- failure = rt_band_set_pixel(band, x, y, 1);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_pixel(band, x, y, 3);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 3, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 3);
- failure = rt_band_set_pixel(band, x, y, 7);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 7, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 7);
- failure = rt_band_set_pixel(band, x, y, 15);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 15, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 15);
}
}
{
double val;
int failure;
+ int clamped;
- failure = rt_band_set_nodata(band, 1);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 1, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_nodata(band, 0);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 0, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_nodata(band, 2);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 2, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 2);
- failure = rt_band_set_nodata(band, 4);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 4, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 4);
- failure = rt_band_set_nodata(band, 8);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 8, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 8);
- failure = rt_band_set_nodata(band, 15);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 15, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 15);
- failure = rt_band_set_nodata(band, 31);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 31, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 31);
- failure = rt_band_set_nodata(band, 255);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 255, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 255);
- failure = rt_band_set_nodata(band, 256); /* out of value range */
- CHECK(failure);
+ failure = rt_band_set_nodata(band, 256, &clamped); /* out of value range */
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
- failure = rt_band_set_pixel(band, 0, 0, 256); /* out of value range */
- CHECK(failure);
+ failure = rt_band_set_pixel(band, 0, 0, 256, &clamped); /* out of value range */
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
{
int x, y;
{
for (y=0; y<rt_band_get_height(band); ++y)
{
- failure = rt_band_set_pixel(band, x, y, 31);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 31, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 31);
- failure = rt_band_set_pixel(band, x, y, 255);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 255, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 255);
- failure = rt_band_set_pixel(band, x, y, 1);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 1);
}
}
{
double val;
int failure;
+ int clamped;
- failure = rt_band_set_nodata(band, 1);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 1, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_nodata(band, 0);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 0, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_nodata(band, 2);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 2, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 2);
- failure = rt_band_set_nodata(band, 4);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 4, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 4);
- failure = rt_band_set_nodata(band, 8);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 8, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 8);
- failure = rt_band_set_nodata(band, 15);
+ failure = rt_band_set_nodata(band, 15, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 15);
- failure = rt_band_set_nodata(band, 31);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 31, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 31);
- failure = rt_band_set_nodata(band, -127);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, -127, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, -127);
- failure = rt_band_set_nodata(band, 127);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 127, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 127);
/* out of range (-127..127) */
- failure = rt_band_set_nodata(band, -129);
- CHECK(failure);
+ failure = rt_band_set_nodata(band, -129, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of range (-127..127) */
- failure = rt_band_set_nodata(band, 129);
- CHECK(failure);
+ failure = rt_band_set_nodata(band, 129, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of range (-127..127) */
- failure = rt_band_set_pixel(band, 0, 0, -129);
- CHECK(failure);
+ failure = rt_band_set_pixel(band, 0, 0, -129, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of range (-127..127) */
- failure = rt_band_set_pixel(band, 0, 0, 129);
- CHECK(failure);
+ failure = rt_band_set_pixel(band, 0, 0, 129, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
{
{
for (y=0; y<rt_band_get_height(band); ++y)
{
- failure = rt_band_set_pixel(band, x, y, 31);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 31, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 31);
- failure = rt_band_set_pixel(band, x, y, 1);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_pixel(band, x, y, -127);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, -127, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, -127);
- failure = rt_band_set_pixel(band, x, y, 127);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 127, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 127);
}
{
double val;
int failure;
+ int clamped;
- failure = rt_band_set_nodata(band, 1);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 1, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_nodata(band, 0);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 0, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_nodata(band, 31);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 31, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 31);
- failure = rt_band_set_nodata(band, 255);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 255, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 255);
- failure = rt_band_set_nodata(band, 65535);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 65535, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
//printf("set 65535 on %s band gets %g back\n", pixtypeName, val);
CHECK_EQUALS(val, 65535);
- failure = rt_band_set_nodata(band, 65536); /* out of range */
- CHECK(failure);
+ failure = rt_band_set_nodata(band, 65536, &clamped); /* out of range */
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of value range */
- failure = rt_band_set_pixel(band, 0, 0, 65536);
- CHECK(failure);
+ failure = rt_band_set_pixel(band, 0, 0, 65536, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of dimensions range */
- failure = rt_band_set_pixel(band, rt_band_get_width(band), 0, 0);
- CHECK(failure);
+ failure = rt_band_set_pixel(band, rt_band_get_width(band), 0, 0, &clamped);
+ CHECK((failure != ES_NONE));
{
int x, y;
{
for (y=0; y<rt_band_get_height(band); ++y)
{
- failure = rt_band_set_pixel(band, x, y, 255);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 255, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 255);
- failure = rt_band_set_pixel(band, x, y, 65535);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 65535, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 65535);
}
}
{
double val;
int failure;
+ int clamped;
- failure = rt_band_set_nodata(band, 1);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 1, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_nodata(band, 0);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 0, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_nodata(band, 31);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 31, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 31);
- failure = rt_band_set_nodata(band, 255);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 255, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 255);
- failure = rt_band_set_nodata(band, -32767);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, -32767, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
//printf("set 65535 on %s band gets %g back\n", pixtypeName, val);
CHECK_EQUALS(val, -32767);
- failure = rt_band_set_nodata(band, 32767);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 32767, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
//printf("set 65535 on %s band gets %g back\n", pixtypeName, val);
CHECK_EQUALS(val, 32767);
/* out of range (-32767..32767) */
- failure = rt_band_set_nodata(band, -32769);
- CHECK(failure);
+ failure = rt_band_set_nodata(band, -32769, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of range (-32767..32767) */
- failure = rt_band_set_nodata(band, 32769);
- CHECK(failure);
+ failure = rt_band_set_nodata(band, 32769, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of range (-32767..32767) */
- failure = rt_band_set_pixel(band, 0, 0, -32769);
- CHECK(failure);
+ failure = rt_band_set_pixel(band, 0, 0, -32769, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of range (-32767..32767) */
- failure = rt_band_set_pixel(band, 0, 0, 32769);
- CHECK(failure);
+ failure = rt_band_set_pixel(band, 0, 0, 32769, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of dimensions range */
- failure = rt_band_set_pixel(band, rt_band_get_width(band), 0, 0);
- CHECK(failure);
+ failure = rt_band_set_pixel(band, rt_band_get_width(band), 0, 0, NULL);
+ CHECK((failure != ES_NONE));
{
int x, y;
{
for (y=0; y<rt_band_get_height(band); ++y)
{
- failure = rt_band_set_pixel(band, x, y, 255);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 255, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 255);
- failure = rt_band_set_pixel(band, x, y, -32767);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, -32767, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, -32767);
- failure = rt_band_set_pixel(band, x, y, 32767);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 32767, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 32767);
}
}
{
double val;
int failure;
+ int clamped;
- failure = rt_band_set_nodata(band, 1);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 1, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_nodata(band, 0);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 0, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_nodata(band, 65535);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 65535, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 65535);
- failure = rt_band_set_nodata(band, 4294967295UL);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 4294967295UL, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 4294967295UL);
/* out of range */
- failure = rt_band_set_nodata(band, 4294967296ULL);
- CHECK(failure);
+ failure = rt_band_set_nodata(band, 4294967296ULL, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of value range */
- failure = rt_band_set_pixel(band, 0, 0, 4294967296ULL);
- CHECK(failure);
+ failure = rt_band_set_pixel(band, 0, 0, 4294967296ULL, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of dimensions range */
- failure = rt_band_set_pixel(band, rt_band_get_width(band),
- 0, 4294967296ULL);
- CHECK(failure);
+ failure = rt_band_set_pixel(band, rt_band_get_width(band), 0, 4294967296ULL, NULL);
+ CHECK((failure != ES_NONE));
{
int x, y;
{
for (y=0; y<rt_band_get_height(band); ++y)
{
- failure = rt_band_set_pixel(band, x, y, 1);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_pixel(band, x, y, 0);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 0, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_pixel(band, x, y, 65535);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 65535, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 65535);
- failure = rt_band_set_pixel(band, x, y, 4294967295UL);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 4294967295UL, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 4294967295UL);
}
}
{
double val;
int failure;
+ int clamped;
- failure = rt_band_set_nodata(band, 1);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 1, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_nodata(band, 0);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 0, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_nodata(band, 65535);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 65535, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 65535);
- failure = rt_band_set_nodata(band, 2147483647);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 2147483647, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
/*printf("32BSI pix is %ld\n", (long int)val);*/
CHECK_EQUALS(val, 2147483647);
- failure = rt_band_set_nodata(band, 2147483648UL);
/* out of range */
- CHECK(failure);
+ failure = rt_band_set_nodata(band, 2147483648UL, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of value range */
- failure = rt_band_set_pixel(band, 0, 0, 2147483648UL);
- CHECK(failure);
+ failure = rt_band_set_pixel(band, 0, 0, 2147483648UL, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(clamped);
/* out of dimensions range */
- failure = rt_band_set_pixel(band, rt_band_get_width(band), 0, 0);
- CHECK(failure);
+ failure = rt_band_set_pixel(band, rt_band_get_width(band), 0, 0, NULL);
+ CHECK((failure != ES_NONE));
{
{
for (y=0; y<rt_band_get_height(band); ++y)
{
- failure = rt_band_set_pixel(band, x, y, 1);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_pixel(band, x, y, 0);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 0, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_pixel(band, x, y, 65535);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 65535, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 65535);
- failure = rt_band_set_pixel(band, x, y, 2147483647);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 2147483647, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 2147483647);
}
}
{
double val;
int failure;
+ int clamped;
- failure = rt_band_set_nodata(band, 1);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 1, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_nodata(band, 0);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 0, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_nodata(band, 65535.5);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 65535.5, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
//printf("set 65535.56 on %s band gets %g back\n", pixtypeName, val);
CHECK_EQUALS_DOUBLE(val, 65535.5);
- failure = rt_band_set_nodata(band, 0.006);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 0.006, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS_DOUBLE(val, 0.0060000000521540); /* XXX: Alternatively, use CHECK_EQUALS_DOUBLE_EX */
{
for (y=0; y<rt_band_get_height(band); ++y)
{
- failure = rt_band_set_pixel(band, x, y, 1);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_pixel(band, x, y, 0);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 0, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_pixel(band, x, y, 65535.5);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 65535.5, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS_DOUBLE(val, 65535.5);
- failure = rt_band_set_pixel(band, x, y, 0.006);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 0.006, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS_DOUBLE(val, 0.0060000000521540);
}
{
double val;
int failure;
+ int clamped;
- failure = rt_band_set_nodata(band, 1);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 1, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_nodata(band, 0);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 0, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_nodata(band, 65535.56);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 65535.56, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 65535.56);
- failure = rt_band_set_nodata(band, 0.006);
- CHECK(!failure);
+ failure = rt_band_set_nodata(band, 0.006, &clamped);
+ CHECK_EQUALS(failure, ES_NONE);
+ CHECK(!clamped);
rt_band_get_nodata(band, &val);
CHECK_EQUALS(val, 0.006);
{
for (y=0; y<rt_band_get_height(band); ++y)
{
- failure = rt_band_set_pixel(band, x, y, 1);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 1);
- failure = rt_band_set_pixel(band, x, y, 0);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 0, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 0);
- failure = rt_band_set_pixel(band, x, y, 65535.56);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 65535.56, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 65535.56);
- failure = rt_band_set_pixel(band, x, y, 0.006);
- CHECK(!failure);
+ failure = rt_band_set_pixel(band, x, y, 0.006, NULL);
+ CHECK_EQUALS(failure, ES_NONE);
failure = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK(!failure);
+ CHECK_EQUALS(failure, ES_NONE);
CHECK_EQUALS(val, 0.006);
}
for (x = 0; x < 5; x++) {
band = addBand(raster, PT_32BUI, 0, 0);
CHECK(band);
- rt_band_set_nodata(band, 0);
+ rt_band_set_nodata(band, 0, NULL);
}
rast = rt_raster_from_band(raster, bandNums, lenBandNums);
for (x = 0; x < xmax; x++) {
for (y = 0; y < ymax; y++) {
- rtn = rt_band_set_pixel(band, x, y, x + y);
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, x + y, NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
assert(raster);
band = addBand(raster, PT_8BUI, 0, 0);
CHECK(band);
- rt_band_set_nodata(band, 0);
+ rt_band_set_nodata(band, 0, NULL);
for (x = 0; x < xmax; x++) {
for (y = 0; y < ymax; y++) {
- rtn = rt_band_set_pixel(band, x, y, values[(x * ymax) + y]);
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, values[(x * ymax) + y], NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
assert(raster);
band = addBand(raster, PT_64BF, 0, 0);
CHECK(band);
- rt_band_set_nodata(band, 0);
+ rt_band_set_nodata(band, 0, NULL);
for (x = 0; x < xmax; x++) {
for (y = 0; y < ymax; y++) {
- rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1));
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1), NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
assert(raster); /* or we're out of virtual memory */
band = addBand(raster, PT_16BUI, 0, 0);
CHECK(band);
- rt_band_set_nodata(band, 0);
+ rt_band_set_nodata(band, 0, NULL);
for (x = 0; x < 100; x++) {
for (y = 0; y < 10; y++) {
- rtn = rt_band_set_pixel(band, x, y, x * y + (x + y));
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, x * y + (x + y), NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
CHECK(newband);
rtn = rt_band_get_pixel(newband, 0, 0, &val, NULL);
- CHECK((rtn != -1));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK_EQUALS(val, 0);
rtn = rt_band_get_pixel(newband, 49, 5, &val, NULL);
- CHECK((rtn != -1));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK_EQUALS(val, 77);
rtn = rt_band_get_pixel(newband, 99, 9, &val, NULL);
- CHECK((rtn != -1));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK_EQUALS(val, 255);
for (i = cnt - 1; i >= 0; i--) rtdealloc(exprset[i]);
assert(raster); /* or we're out of virtual memory */
band = addBand(raster, PT_64BF, 0, 0);
CHECK(band);
- rt_band_set_nodata(band, 0);
+ rt_band_set_nodata(band, 0, NULL);
rt_raster_set_offsets(raster, -500000, 600000);
rt_raster_set_scale(raster, 1000, -1000);
for (x = 0; x < xmax; x++) {
for (y = 0; y < ymax; y++) {
- rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1));
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1), NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
assert(raster); /* or we're out of virtual memory */
band = addBand(raster, PT_8BSI, 0, 0);
CHECK(band);
- rt_band_set_nodata(band, 0);
+ rt_band_set_nodata(band, 0, NULL);
rt_raster_set_offsets(raster, -500000, 600000);
rt_raster_set_scale(raster, 1000, -1000);
for (x = 0; x < xmax; x++) {
for (y = 0; y < ymax; y++) {
- rtn = rt_band_set_pixel(band, x, y, x);
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, x, NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
assert(raster); /* or we're out of virtual memory */
band = addBand(raster, PT_64BF, 0, 0);
CHECK(band);
- rt_band_set_nodata(band, 0);
+ rt_band_set_nodata(band, 0, NULL);
for (x = 0; x < xmax; x++) {
for (y = 0; y < ymax; y++) {
- rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1));
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1), NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
vcnts = rt_band_get_value_count(band, 1, NULL, 0, 0, NULL, &rtn);
assert(raster); /* or we're out of virtual memory */
band = addBand(raster, PT_64BF, 0, 0);
CHECK(band);
- rt_band_set_nodata(band, 0);
+ rt_band_set_nodata(band, 0, NULL);
for (x = 0; x < xmax; x++) {
for (y = 0; y < ymax; y++) {
values[x][y] = (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1);
- rtn = rt_band_set_pixel(band, x, y, values[x][y]);
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, values[x][y], NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
for (x = 0; x < xmax; x++) {
for (y = 0; y < ymax; y++) {
rtn = rt_band_get_pixel(band, x, y, &value, NULL);
- CHECK((rtn != -1));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK(FLT_EQ(value, values[x][y]));
}
}
assert(raster); /* or we're out of virtual memory */
band = addBand(raster, PT_8BSI, 0, 0);
CHECK(band);
- rt_band_set_nodata(band, 0);
+ rt_band_set_nodata(band, 0, NULL);
v = -127;
for (x = 0; x < xmax; x++) {
for (y = 0; y < ymax; y++) {
values[x][y] = v++;
- rtn = rt_band_set_pixel(band, x, y, values[x][y]);
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, values[x][y], NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
if (v == 128)
v = -127;
}
for (x = 0; x < xmax; x++) {
for (y = 0; y < ymax; y++) {
rtn = rt_band_get_pixel(band, x, y, &value, NULL);
- CHECK((rtn != -1));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK(FLT_EQ(value, values[x][y]));
}
}
assert(raster); /* or we're out of virtual memory */
band = addBand(raster, PT_64BF, 0, 0);
CHECK(band);
- rt_band_set_nodata(band, 0);
+ rt_band_set_nodata(band, 0, NULL);
rt_raster_set_offsets(raster, -500000, 600000);
rt_raster_set_scale(raster, 1000, -1000);
for (x = 0; x < xmax; x++) {
for (y = 0; y < ymax; y++) {
- rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1));
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1), NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
rt_band_get_nodata(band, &value);
CHECK(FLT_EQ(value, 0.));
- CHECK(rt_band_get_pixel(band, 0, 0, &value, NULL) == 0);
+ CHECK_EQUALS(rt_band_get_pixel(band, 0, 0, &value, NULL), ES_NONE);
CHECK(FLT_EQ(value, 0.));
deepRelease(rast);
band1 = addBand(rast1, PT_8BUI, 1, 0);
CHECK(band1);
- rt_band_set_nodata(band1, 0);
- rtn = rt_band_set_pixel(band1, 0, 0, 1);
- rtn = rt_band_set_pixel(band1, 0, 1, 1);
- rtn = rt_band_set_pixel(band1, 1, 0, 1);
- rtn = rt_band_set_pixel(band1, 1, 1, 1);
+ rt_band_set_nodata(band1, 0, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 1, 1, NULL);
rt_band_get_nodata(band1, &nodata);
CHECK_EQUALS(nodata, 0);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
rtn = rt_raster_intersects(
rast2, -1,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
rtn = rt_raster_intersects(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
rtn = rt_raster_intersects(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
rtn = rt_raster_intersects(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
rtn = rt_raster_intersects(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_intersects(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
rt_raster_set_offsets(rast2, 0.1, 0.1);
rt_raster_set_scale(rast2, 0.4, 0.4);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_intersects(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
*/
rt_raster_set_offsets(rast2, -2, -2);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rtn = rt_raster_intersects(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_intersects(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_intersects(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 0);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_intersects(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 2);
- rtn = rt_band_set_pixel(band2, 0, 2, 3);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 2);
- rtn = rt_band_set_pixel(band2, 1, 2, 3);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 2);
- rtn = rt_band_set_pixel(band2, 2, 2, 3);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 3, NULL);
rtn = rt_raster_intersects(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/* rast2 (skewed by -1, 1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/* rast2 (skewed by 1, -1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band1 = addBand(rast1, PT_8BUI, 1, 0);
CHECK(band1);
- rt_band_set_nodata(band1, 0);
- rtn = rt_band_set_pixel(band1, 0, 0, 1);
- rtn = rt_band_set_pixel(band1, 0, 1, 1);
- rtn = rt_band_set_pixel(band1, 1, 0, 1);
- rtn = rt_band_set_pixel(band1, 1, 1, 1);
+ rt_band_set_nodata(band1, 0, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 1, 1, NULL);
rt_band_get_nodata(band1, &nodata);
CHECK_EQUALS(nodata, 0);
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
rtn = rt_raster_overlaps(
rast2, -1,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
rtn = rt_raster_overlaps(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
rtn = rt_raster_overlaps(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
rtn = rt_raster_overlaps(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
rtn = rt_raster_overlaps(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_overlaps(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
rt_raster_set_offsets(rast2, 0.1, 0.1);
rt_raster_set_scale(rast2, 0.4, 0.4);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_overlaps(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
*/
rt_raster_set_offsets(rast2, -2, -2);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rtn = rt_raster_overlaps(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_overlaps(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_overlaps(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 0);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_overlaps(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 2);
- rtn = rt_band_set_pixel(band2, 0, 2, 3);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 2);
- rtn = rt_band_set_pixel(band2, 1, 2, 3);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 2);
- rtn = rt_band_set_pixel(band2, 2, 2, 3);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 3, NULL);
rtn = rt_raster_overlaps(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/* rast2 (skewed by -1, 1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/* rast2 (skewed by 1, -1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band1 = addBand(rast1, PT_8BUI, 1, 0);
CHECK(band1);
- rt_band_set_nodata(band1, 0);
- rtn = rt_band_set_pixel(band1, 0, 0, 1);
- rtn = rt_band_set_pixel(band1, 0, 1, 1);
- rtn = rt_band_set_pixel(band1, 1, 0, 1);
- rtn = rt_band_set_pixel(band1, 1, 1, 1);
+ rt_band_set_nodata(band1, 0, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 1, 1, NULL);
rt_band_get_nodata(band1, &nodata);
CHECK_EQUALS(nodata, 0);
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_touches(
rast2, -1,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
*/
rt_raster_set_offsets(rast2, -1, 1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
rt_raster_set_offsets(rast2, 0.1, 0.1);
rt_raster_set_scale(rast2, 0.4, 0.4);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, -2, -2);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 0);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 2);
- rtn = rt_band_set_pixel(band2, 0, 2, 3);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 2);
- rtn = rt_band_set_pixel(band2, 1, 2, 3);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 2);
- rtn = rt_band_set_pixel(band2, 2, 2, 3);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 3, NULL);
rtn = rt_raster_touches(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/* rast2 (skewed by -1, 1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/* rast2 (skewed by 1, -1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band1 = addBand(rast1, PT_8BUI, 1, 0);
CHECK(band1);
- rt_band_set_nodata(band1, 0);
- rtn = rt_band_set_pixel(band1, 0, 0, 1);
- rtn = rt_band_set_pixel(band1, 0, 1, 1);
- rtn = rt_band_set_pixel(band1, 1, 0, 1);
- rtn = rt_band_set_pixel(band1, 1, 1, 1);
+ rt_band_set_nodata(band1, 0, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 1, 1, NULL);
rt_band_get_nodata(band1, &nodata);
CHECK_EQUALS(nodata, 0);
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_contains(
rast2, -1,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, -1, 1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
rt_raster_set_offsets(rast2, 0.1, 0.1);
rt_raster_set_scale(rast2, 0.4, 0.4);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, -2, -2);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 0);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 2);
- rtn = rt_band_set_pixel(band2, 0, 2, 3);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 2);
- rtn = rt_band_set_pixel(band2, 1, 2, 3);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 2);
- rtn = rt_band_set_pixel(band2, 2, 2, 3);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 3, NULL);
rtn = rt_raster_contains(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/* rast2 (skewed by -1, 1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/* rast2 (skewed by 1, -1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band1 = addBand(rast1, PT_8BUI, 1, 0);
CHECK(band1);
- rt_band_set_nodata(band1, 0);
- rtn = rt_band_set_pixel(band1, 0, 0, 1);
- rtn = rt_band_set_pixel(band1, 0, 1, 1);
- rtn = rt_band_set_pixel(band1, 1, 0, 1);
- rtn = rt_band_set_pixel(band1, 1, 1, 1);
+ rt_band_set_nodata(band1, 0, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 1, 1, NULL);
rt_band_get_nodata(band1, &nodata);
CHECK_EQUALS(nodata, 0);
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_contains_properly(
rast2, -1,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, -1, 1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
rt_raster_set_offsets(rast2, 0.1, 0.1);
rt_raster_set_scale(rast2, 0.4, 0.4);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, -2, -2);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 0);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 2);
- rtn = rt_band_set_pixel(band2, 0, 2, 3);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 2);
- rtn = rt_band_set_pixel(band2, 1, 2, 3);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 2);
- rtn = rt_band_set_pixel(band2, 2, 2, 3);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 3, NULL);
rtn = rt_raster_contains_properly(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/* rast2 (skewed by -1, 1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/* rast2 (skewed by 1, -1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band1 = addBand(rast1, PT_8BUI, 1, 0);
CHECK(band1);
- rt_band_set_nodata(band1, 0);
- rtn = rt_band_set_pixel(band1, 0, 0, 1);
- rtn = rt_band_set_pixel(band1, 0, 1, 1);
- rtn = rt_band_set_pixel(band1, 1, 0, 1);
- rtn = rt_band_set_pixel(band1, 1, 1, 1);
+ rt_band_set_nodata(band1, 0, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 1, 1, NULL);
rt_band_get_nodata(band1, &nodata);
CHECK_EQUALS(nodata, 0);
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_covers(
rast2, -1,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, -1, 1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
rt_raster_set_offsets(rast2, 0.1, 0.1);
rt_raster_set_scale(rast2, 0.4, 0.4);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, -2, -2);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 0);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 2);
- rtn = rt_band_set_pixel(band2, 0, 2, 3);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 2);
- rtn = rt_band_set_pixel(band2, 1, 2, 3);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 2);
- rtn = rt_band_set_pixel(band2, 2, 2, 3);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 3, NULL);
rtn = rt_raster_covers(
rast1, 0,
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/* rast2 (skewed by -1, 1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/* rast2 (skewed by 1, -1) */
rast2, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band1 = addBand(rast1, PT_8BUI, 1, 0);
CHECK(band1);
- rt_band_set_nodata(band1, 0);
- rtn = rt_band_set_pixel(band1, 0, 0, 1);
- rtn = rt_band_set_pixel(band1, 0, 1, 1);
- rtn = rt_band_set_pixel(band1, 1, 0, 1);
- rtn = rt_band_set_pixel(band1, 1, 1, 1);
+ rt_band_set_nodata(band1, 0, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 1, 1, NULL);
rt_band_get_nodata(band1, &nodata);
CHECK_EQUALS(nodata, 0);
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_coveredby(
rast1, -1,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, -1, 1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
rt_raster_set_offsets(rast2, 0.1, 0.1);
rt_raster_set_scale(rast2, 0.4, 0.4);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, -2, -2);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 0);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 2);
- rtn = rt_band_set_pixel(band2, 0, 2, 3);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 2);
- rtn = rt_band_set_pixel(band2, 1, 2, 3);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 2);
- rtn = rt_band_set_pixel(band2, 2, 2, 3);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 3, NULL);
rtn = rt_raster_coveredby(
rast2, 0,
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/* rast2 (skewed by -1, 1) */
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/* rast2 (skewed by 1, -1) */
rast1, 0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band1 = addBand(rast1, PT_8BUI, 1, 0);
CHECK(band1);
- rt_band_set_nodata(band1, 0);
- rtn = rt_band_set_pixel(band1, 0, 0, 1);
- rtn = rt_band_set_pixel(band1, 0, 1, 1);
- rtn = rt_band_set_pixel(band1, 1, 0, 1);
- rtn = rt_band_set_pixel(band1, 1, 1, 1);
+ rt_band_set_nodata(band1, 0, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 1, 1, NULL);
rt_band_get_nodata(band1, &nodata);
CHECK_EQUALS(nodata, 0);
0.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
rtn = rt_raster_within_distance(
-1.,
&result
);
- CHECK((rtn == 0));
+ CHECK((rtn != ES_NONE));
/*
rast2
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
0.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
rtn = rt_raster_within_distance(
1.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
rtn = rt_raster_within_distance(
2.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
0.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
0.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_within_distance(
1.1,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
rt_raster_set_offsets(rast2, 0.1, 0.1);
rt_raster_set_scale(rast2, 0.4, 0.4);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
*/
rt_raster_set_offsets(rast2, -2, -2);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 0);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
*/
rt_raster_set_offsets(rast2, -10, -1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
5,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_within_distance(
6,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 2);
- rtn = rt_band_set_pixel(band2, 0, 2, 3);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 2);
- rtn = rt_band_set_pixel(band2, 1, 2, 3);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 2);
- rtn = rt_band_set_pixel(band2, 2, 2, 3);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 3, NULL);
rtn = rt_raster_within_distance(
rast1, 0,
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/* rast2 (skewed by -1, 1) */
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/* rast2 (skewed by 1, -1) */
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band1 = addBand(rast1, PT_8BUI, 1, 0);
CHECK(band1);
- rt_band_set_nodata(band1, 0);
- rtn = rt_band_set_pixel(band1, 0, 0, 1);
- rtn = rt_band_set_pixel(band1, 0, 1, 1);
- rtn = rt_band_set_pixel(band1, 1, 0, 1);
- rtn = rt_band_set_pixel(band1, 1, 1, 1);
+ rt_band_set_nodata(band1, 0, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band1, 1, 1, 1, NULL);
rt_band_get_nodata(band1, &nodata);
CHECK_EQUALS(nodata, 0);
0.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_fully_within_distance(
-1.,
&result
);
- CHECK((rtn == 0));
+ CHECK((rtn != ES_NONE));
/*
rast2
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
0.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_fully_within_distance(
1.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_fully_within_distance(
5.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
2.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
5.,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
5,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+
(2, 2)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
10,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, 2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
0,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_fully_within_distance(
5.9,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
rt_raster_set_offsets(rast2, 0.1, 0.1);
rt_raster_set_scale(rast2, 0.4, 0.4);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
3,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
2,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rt_band_get_nodata(band2, &nodata);
CHECK_EQUALS(nodata, 0);
6,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
*/
rt_raster_set_offsets(rast2, -2, -2);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
4.25,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
3.5,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
3.65,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/*
+-+-+-+
(1, 1)
*/
- rtn = rt_band_set_pixel(band2, 0, 0, 0);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 0);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 0);
- rtn = rt_band_set_pixel(band2, 1, 2, 0);
- rtn = rt_band_set_pixel(band2, 2, 0, 0);
- rtn = rt_band_set_pixel(band2, 2, 1, 0);
- rtn = rt_band_set_pixel(band2, 2, 2, 0);
+ rtn = rt_band_set_pixel(band2, 0, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 0, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
3.6,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
/*
*/
rt_raster_set_offsets(rast2, -10, -1);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 1);
- rtn = rt_band_set_pixel(band2, 0, 2, 1);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 1);
- rtn = rt_band_set_pixel(band2, 1, 2, 1);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 1);
- rtn = rt_band_set_pixel(band2, 2, 2, 1);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 1, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
5,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result != 1));
rtn = rt_raster_fully_within_distance(
11.5,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
band2 = addBand(rast2, PT_8BUI, 1, 0);
CHECK(band2);
- rt_band_set_nodata(band2, 0);
- rtn = rt_band_set_pixel(band2, 0, 0, 1);
- rtn = rt_band_set_pixel(band2, 0, 1, 2);
- rtn = rt_band_set_pixel(band2, 0, 2, 3);
- rtn = rt_band_set_pixel(band2, 1, 0, 1);
- rtn = rt_band_set_pixel(band2, 1, 1, 2);
- rtn = rt_band_set_pixel(band2, 1, 2, 3);
- rtn = rt_band_set_pixel(band2, 2, 0, 1);
- rtn = rt_band_set_pixel(band2, 2, 1, 2);
- rtn = rt_band_set_pixel(band2, 2, 2, 3);
+ rt_band_set_nodata(band2, 0, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 0, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 1, 2, 3, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 0, 1, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 1, 2, NULL);
+ rtn = rt_band_set_pixel(band2, 2, 2, 3, NULL);
rtn = rt_raster_fully_within_distance(
rast1, 0,
6.1,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/* rast2 (skewed by -1, 1) */
7.1,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
/* rast2 (skewed by 1, -1) */
8,
&result
);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((result == 1));
deepRelease(rast2);
rt_raster_set_scale(rast2, 1, 1);
rtn = rt_raster_same_alignment(rast1, rast2, &aligned);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((aligned != 0));
rt_raster_set_scale(rast2, 0.1, 0.1);
rtn = rt_raster_same_alignment(rast1, rast2, &aligned);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((aligned == 0));
rt_raster_set_scale(rast2, 1, 1);
rt_raster_set_skews(rast2, -0.5, 0.5);
rtn = rt_raster_same_alignment(rast1, rast2, &aligned);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((aligned == 0));
rt_raster_set_skews(rast2, 0, 0);
rt_raster_set_offsets(rast2, 1, 1);
rtn = rt_raster_same_alignment(rast1, rast2, &aligned);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((aligned != 0));
rt_raster_set_offsets(rast2, 2, 3);
rtn = rt_raster_same_alignment(rast1, rast2, &aligned);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((aligned != 0));
rt_raster_set_offsets(rast2, 0.1, 0.1);
rtn = rt_raster_same_alignment(rast1, rast2, &aligned);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK((aligned == 0));
deepRelease(rast2);
for (x = 0; x < maxX; x++) {
for (y = 0; y < maxY; y++) {
rtn = rt_band_get_pixel(band, x, y, &val, NULL);
- CHECK((rtn == 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK(FLT_EQ(val, 255));
}
}
xr = 0;
yr = 0;
rtn = rt_raster_cell_to_geopoint(raster, xr, yr, &xw, &yw, NULL);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK(FLT_EQ(xw, gt[0]));
CHECK(FLT_EQ(yw, gt[3]));
rtn = rt_raster_geopoint_to_cell(raster, xw, yw, &xr, &yr, NULL);
- CHECK((rtn != 0));
+ CHECK_EQUALS(rtn, ES_NONE);
CHECK(FLT_EQ(xr, 0));
CHECK(FLT_EQ(yr, 0));
for (x = 0; x < maxX; x++) {
for (y = 0; y < maxY; y++) {
- rtn = rt_band_set_pixel(band, x, y, 1);
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
- rt_band_set_pixel(band, 0, 0, 0);
- rt_band_set_pixel(band, 3, 0, 0);
- rt_band_set_pixel(band, 6, 0, 0);
- rt_band_set_pixel(band, 9, 0, 0);
- rt_band_set_pixel(band, 1, 2, 0);
- rt_band_set_pixel(band, 4, 2, 0);
- rt_band_set_pixel(band, 7, 2, 0);
- rt_band_set_pixel(band, 2, 4, 0);
- rt_band_set_pixel(band, 5, 4, 0);
- rt_band_set_pixel(band, 8, 4, 0);
- rt_band_set_pixel(band, 0, 6, 0);
- rt_band_set_pixel(band, 3, 6, 0);
- rt_band_set_pixel(band, 6, 6, 0);
- rt_band_set_pixel(band, 9, 6, 0);
- rt_band_set_pixel(band, 1, 8, 0);
- rt_band_set_pixel(band, 4, 8, 0);
- rt_band_set_pixel(band, 7, 8, 0);
+ rt_band_set_pixel(band, 0, 0, 0, NULL);
+ rt_band_set_pixel(band, 3, 0, 0, NULL);
+ rt_band_set_pixel(band, 6, 0, 0, NULL);
+ rt_band_set_pixel(band, 9, 0, 0, NULL);
+ rt_band_set_pixel(band, 1, 2, 0, NULL);
+ rt_band_set_pixel(band, 4, 2, 0, NULL);
+ rt_band_set_pixel(band, 7, 2, 0, NULL);
+ rt_band_set_pixel(band, 2, 4, 0, NULL);
+ rt_band_set_pixel(band, 5, 4, 0, NULL);
+ rt_band_set_pixel(band, 8, 4, 0, NULL);
+ rt_band_set_pixel(band, 0, 6, 0, NULL);
+ rt_band_set_pixel(band, 3, 6, 0, NULL);
+ rt_band_set_pixel(band, 6, 6, 0, NULL);
+ rt_band_set_pixel(band, 9, 6, 0, NULL);
+ rt_band_set_pixel(band, 1, 8, 0, NULL);
+ rt_band_set_pixel(band, 4, 8, 0, NULL);
+ rt_band_set_pixel(band, 7, 8, 0, NULL);
/* 0,0 */
rtn = rt_band_get_nearest_pixel(
&nodata,
&dimx, &dimy
);
- CHECK((rtn != 0));
+ rtdealloc(npixels);
+ CHECK((rtn == ES_NONE));
CHECK((dimx == 3));
CHECK((dimy == 3));
rtdealloc(nodata);
rtdealloc(value);
- if (rtn)
- rtdealloc(npixels);
/* -2,2 distance 1 */
rtn = rt_band_get_nearest_pixel(
for (x = 0; x < maxX; x++) {
for (y = 0; y < maxY; y++) {
- rtn = rt_band_set_pixel(band, x, y, 1);
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
- rt_band_set_pixel(band, 0, 0, 0);
- rt_band_set_pixel(band, 3, 0, 0);
- rt_band_set_pixel(band, 6, 0, 0);
- rt_band_set_pixel(band, 9, 0, 0);
- rt_band_set_pixel(band, 1, 2, 0);
- rt_band_set_pixel(band, 4, 2, 0);
- rt_band_set_pixel(band, 7, 2, 0);
- rt_band_set_pixel(band, 2, 4, 0);
- rt_band_set_pixel(band, 5, 4, 0);
- rt_band_set_pixel(band, 8, 4, 0);
- rt_band_set_pixel(band, 0, 6, 0);
- rt_band_set_pixel(band, 3, 6, 0);
- rt_band_set_pixel(band, 6, 6, 0);
- rt_band_set_pixel(band, 9, 6, 0);
- rt_band_set_pixel(band, 1, 8, 0);
- rt_band_set_pixel(band, 4, 8, 0);
- rt_band_set_pixel(band, 7, 8, 0);
+ rt_band_set_pixel(band, 0, 0, 0, NULL);
+ rt_band_set_pixel(band, 3, 0, 0, NULL);
+ rt_band_set_pixel(band, 6, 0, 0, NULL);
+ rt_band_set_pixel(band, 9, 0, 0, NULL);
+ rt_band_set_pixel(band, 1, 2, 0, NULL);
+ rt_band_set_pixel(band, 4, 2, 0, NULL);
+ rt_band_set_pixel(band, 7, 2, 0, NULL);
+ rt_band_set_pixel(band, 2, 4, 0, NULL);
+ rt_band_set_pixel(band, 5, 4, 0, NULL);
+ rt_band_set_pixel(band, 8, 4, 0, NULL);
+ rt_band_set_pixel(band, 0, 6, 0, NULL);
+ rt_band_set_pixel(band, 3, 6, 0, NULL);
+ rt_band_set_pixel(band, 6, 6, 0, NULL);
+ rt_band_set_pixel(band, 9, 6, 0, NULL);
+ rt_band_set_pixel(band, 1, 8, 0, NULL);
+ rt_band_set_pixel(band, 4, 8, 0, NULL);
+ rt_band_set_pixel(band, 7, 8, 0, NULL);
pixels = NULL;
rtn = rt_band_get_pixel_of_value(
if (rtn)
rtdealloc(pixels);
- rt_band_set_pixel(band, 4, 2, 3);
- rt_band_set_pixel(band, 7, 2, 5);
- rt_band_set_pixel(band, 1, 8, 3);
+ rt_band_set_pixel(band, 4, 2, 3, NULL);
+ rt_band_set_pixel(band, 7, 2, 5, NULL);
+ rt_band_set_pixel(band, 1, 8, 3, NULL);
pixels = NULL;
rtn = rt_band_get_pixel_of_value(
for (x = 0; x < maxX; x++) {
for (y = 0; y < maxY; y++) {
- rtn = rt_band_set_pixel(band, x, y, 1);
- CHECK((rtn != -1));
+ rtn = rt_band_set_pixel(band, x, y, 1, NULL);
+ CHECK_EQUALS(rtn, ES_NONE);
}
}
- rt_band_set_pixel(band, 0, 0, 0);
- rt_band_set_pixel(band, 3, 0, 0);
- rt_band_set_pixel(band, 6, 0, 0);
- rt_band_set_pixel(band, 9, 0, 0);
- rt_band_set_pixel(band, 1, 2, 0);
- rt_band_set_pixel(band, 4, 2, 0);
- rt_band_set_pixel(band, 7, 2, 0);
- rt_band_set_pixel(band, 2, 4, 0);
- rt_band_set_pixel(band, 5, 4, 0);
- rt_band_set_pixel(band, 8, 4, 0);
- rt_band_set_pixel(band, 0, 6, 0);
- rt_band_set_pixel(band, 3, 6, 0);
- rt_band_set_pixel(band, 6, 6, 0);
- rt_band_set_pixel(band, 9, 6, 0);
- rt_band_set_pixel(band, 1, 8, 0);
- rt_band_set_pixel(band, 4, 8, 0);
- rt_band_set_pixel(band, 7, 8, 0);
+ rt_band_set_pixel(band, 0, 0, 0, NULL);
+ rt_band_set_pixel(band, 3, 0, 0, NULL);
+ rt_band_set_pixel(band, 6, 0, 0, NULL);
+ rt_band_set_pixel(band, 9, 0, 0, NULL);
+ rt_band_set_pixel(band, 1, 2, 0, NULL);
+ rt_band_set_pixel(band, 4, 2, 0, NULL);
+ rt_band_set_pixel(band, 7, 2, 0, NULL);
+ rt_band_set_pixel(band, 2, 4, 0, NULL);
+ rt_band_set_pixel(band, 5, 4, 0, NULL);
+ rt_band_set_pixel(band, 8, 4, 0, NULL);
+ rt_band_set_pixel(band, 0, 6, 0, NULL);
+ rt_band_set_pixel(band, 3, 6, 0, NULL);
+ rt_band_set_pixel(band, 6, 6, 0, NULL);
+ rt_band_set_pixel(band, 9, 6, 0, NULL);
+ rt_band_set_pixel(band, 1, 8, 0, NULL);
+ rt_band_set_pixel(band, 4, 8, 0, NULL);
+ rt_band_set_pixel(band, 7, 8, 0, NULL);
poly = rt_raster_pixel_as_polygon(rast, 1, 1);
CHECK((poly != NULL));
for (y = 0; y < maxY; y++) {
for (x = 0; x < maxX; x++) {
- rt_band_set_pixel(band, x, y, 1);
+ rt_band_set_pixel(band, x, y, 1, NULL);
}
}
mpoly = NULL;
/* 0,0 NODATA */
- rt_band_set_pixel(band, 0, 0, 0);
+ rt_band_set_pixel(band, 0, 0, 0, NULL);
mpoly = rt_raster_surface(rast, 0, &err);
CHECK(err);
mpoly = NULL;
/* plus 1,1 NODATA */
- rt_band_set_pixel(band, 1, 1, 0);
+ rt_band_set_pixel(band, 1, 1, 0, NULL);
mpoly = rt_raster_surface(rast, 0, &err);
CHECK(err);
mpoly = NULL;
/* plus 2,2 NODATA */
- rt_band_set_pixel(band, 2, 2, 0);
+ rt_band_set_pixel(band, 2, 2, 0, NULL);
mpoly = rt_raster_surface(rast, 0, &err);
CHECK(err);
mpoly = NULL;
/* plus 3,3 NODATA */
- rt_band_set_pixel(band, 3, 3, 0);
+ rt_band_set_pixel(band, 3, 3, 0, NULL);
mpoly = rt_raster_surface(rast, 0, &err);
CHECK(err);
mpoly = NULL;
/* plus 4,4 NODATA */
- rt_band_set_pixel(band, 4, 4, 0);
+ rt_band_set_pixel(band, 4, 4, 0, NULL);
mpoly = rt_raster_surface(rast, 0, &err);
CHECK(err);
mpoly = NULL;
/* a whole lot more NODATA */
- rt_band_set_pixel(band, 4, 0, 0);
- rt_band_set_pixel(band, 3, 1, 0);
- rt_band_set_pixel(band, 1, 3, 0);
- rt_band_set_pixel(band, 0, 4, 0);
+ rt_band_set_pixel(band, 4, 0, 0, NULL);
+ rt_band_set_pixel(band, 3, 1, 0, NULL);
+ rt_band_set_pixel(band, 1, 3, 0, NULL);
+ rt_band_set_pixel(band, 0, 4, 0, NULL);
mpoly = rt_raster_surface(rast, 0, &err);
CHECK(err);
for (y = 0; y < maxY; y++) {
for (x = 0; x < maxX; x++) {
- rt_band_set_pixel(band, x, y, x + (y * maxX));
+ rt_band_set_pixel(band, x, y, x + (y * maxX), NULL);
}
}
for (y = 0; y < maxY; y++) {
for (x = 0; x < maxX; x++) {
- rt_band_set_pixel(band, x, y, (x + (y * maxX)) + 100);
+ rt_band_set_pixel(band, x, y, (x + (y * maxX)) + 100, NULL);
}
}
for (y = 0; y < maxY; y++) {
for (x = 0; x < maxX; x++)
- rt_band_set_pixel(band, x, y, x + (y * maxX));
+ rt_band_set_pixel(band, x, y, x + (y * maxX), NULL);
}
err = rt_band_get_pixel_line(band, 0, 0, maxX, &vals, &nvals);
- CHECK((err == 0));
+ CHECK_EQUALS(err, ES_NONE);
CHECK((nvals == maxX));
CHECK((((int8_t *) vals)[3] == 3));
rtdealloc(vals);
err = rt_band_get_pixel_line(band, 4, 4, maxX, &vals, &nvals);
- CHECK((err == 0));
+ CHECK_EQUALS(err, ES_NONE);
CHECK((nvals == 1));
CHECK((((int8_t *) vals)[0] == 24));
rtdealloc(vals);
err = rt_band_get_pixel_line(band, maxX, maxY, maxX, &vals, &nvals);
- CHECK((err != 0));
+ CHECK((err != ES_NONE));
deepRelease(rast);
}