388 CU_ASSERT(
rast != NULL);
394 CU_ASSERT(
band != NULL);
396 for (
y = 0;
y < maxY;
y++) {
397 for (
x = 0;
x < maxX;
x++) {
404 CU_ASSERT(geom != NULL);
406 CU_ASSERT_STRING_EQUAL(wkt,
"POLYGON((0 0,5 0,5 -5,0 -5,0 0))");
420 CU_ASSERT(geom != NULL);
422 CU_ASSERT_STRING_EQUAL(wkt,
"POLYGON((0 -1,5 -1,5 -5,0 -5,0 -1))");
436 CU_ASSERT(geom != NULL);
438 CU_ASSERT_STRING_EQUAL(wkt,
"POLYGON((0 -1,4 -1,4 -5,0 -5,0 -1))");
452 CU_ASSERT(geom != NULL);
454 CU_ASSERT_STRING_EQUAL(wkt,
"POLYGON((0 -1,4 -1,4 -4,0 -4,0 -1))");
468 CU_ASSERT(geom != NULL);
470 CU_ASSERT_STRING_EQUAL(wkt,
"POLYGON((1 -1,4 -1,4 -4,1 -4,1 -1))");
489 CU_ASSERT(geom != NULL);
491 CU_ASSERT_STRING_EQUAL(wkt,
"POLYGON((2 -1,3 -1,3 -4,2 -4,2 -1))");
502 CU_ASSERT(geom != NULL);
504 CU_ASSERT_STRING_EQUAL(wkt,
"POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2))");
511 CU_ASSERT(
band != NULL);
513 for (
y = 0;
y < maxY;
y++) {
514 for (
x = 0;
x < maxX;
x++) {
521 CU_ASSERT(geom != NULL);
523 CU_ASSERT_STRING_EQUAL(wkt,
"POLYGON((0 0,5 0,5 -5,0 -5,0 0))");
static char * lwgeom_to_text(const LWGEOM *lwgeom)
void lwgeom_free(LWGEOM *geom)
void rt_raster_set_scale(rt_raster raster, double scaleX, double scaleY)
Set scale in projection units.
rt_raster rt_raster_new(uint32_t width, uint32_t height)
Construct a raster with given dimensions.
rt_errorstate rt_band_set_pixel(rt_band band, int x, int y, double val, int *converted)
Set single pixel's value.
void rtdealloc(void *mem)
rt_errorstate rt_raster_get_perimeter(rt_raster raster, int nband, LWGEOM **perimeter)
Get raster perimeter.
void rt_raster_set_offsets(rt_raster raster, double x, double y)
Set insertion points in projection units.
rt_band cu_add_band(rt_raster raster, rt_pixtype pixtype, int hasnodata, double nodataval)
void cu_free_raster(rt_raster raster)