495 {
499
500 int num = 2;
501
504 int maxX = 5;
505 int maxY = 5;
508 int noerr = 0;
511
513 CU_ASSERT(rast1 != NULL);
514
517
519 CU_ASSERT(band != NULL);
520
521 for (y = 0;
y < maxY;
y++) {
522 for (x = 0;
x < maxX;
x++) {
524 }
525 }
526
528 CU_ASSERT(rast2 != NULL);
529
532
534 CU_ASSERT(band != NULL);
535
536 for (y = 0;
y < maxY;
y++) {
537 for (x = 0;
x < maxX;
x++) {
539 }
540 }
541
543 CU_ASSERT(rast3 != NULL);
544
547
548
550 CU_ASSERT(userargs != NULL);
551
552
554 CU_ASSERT(itrset != NULL);
561
562
566
568 itrset, 1,
571 1, 0,
572 0, 0,
573 NULL,
574 userargs,
576 &rtn
577 );
578 CU_ASSERT_EQUAL(noerr,
ES_NONE);
588
590 rtn = NULL;
591
592
596
598 itrset, 1,
601 1, 0,
602 0, 0,
603 NULL,
604 userargs,
606 &rtn
607 );
608 CU_ASSERT_EQUAL(noerr,
ES_NONE);
618
620 rtn = NULL;
621
622
626
628 itrset, 2,
631 1, 0,
632 0, 0,
633 NULL,
634 userargs,
636 &rtn
637 );
638 CU_ASSERT_EQUAL(noerr,
ES_NONE);
648
650 rtn = NULL;
651
652
654 itrset, 2,
657 1, 0,
658 0, 0,
659 NULL,
660 userargs,
662 &rtn
663 );
664 CU_ASSERT_EQUAL(noerr,
ES_NONE);
674
676 rtn = NULL;
677
678
680 itrset, 2,
683 1, 0,
684 0, 0,
685 NULL,
686 userargs,
688 &rtn
689 );
690 CU_ASSERT_EQUAL(noerr,
ES_NONE);
700
702 rtn = NULL;
703
704
706 itrset, 2,
709 1, 0,
710 0, 0,
711 NULL,
712 userargs,
714 &rtn
715 );
716 CU_ASSERT_EQUAL(noerr,
ES_NONE);
726
728 rtn = NULL;
729
730
732 itrset, 2,
735 1, 0,
736 0, 0,
737 NULL,
738 userargs,
740 &rtn
741 );
742 CU_ASSERT_EQUAL(noerr,
ES_NONE);
752
754 rtn = NULL;
755
756
760
762 itrset, 2,
765 1, 0,
766 1, 1,
767 NULL,
768 userargs,
770 &rtn
771 );
772 CU_ASSERT_EQUAL(noerr,
ES_NONE);
782
784 rtn = NULL;
785
788
792
794}
static int testRasterIterator5_callback(rt_iterator_arg arg, void *userarg, double *value, int *nodata)
static int testRasterIterator7_callback(rt_iterator_arg arg, void *userarg, double *value, int *nodata)
static int testRasterIterator2_callback(rt_iterator_arg arg, void *userarg, double *value, int *nodata)
static int testRasterIterator1_callback(rt_iterator_arg arg, void *userarg, double *value, int *nodata)
static int testRasterIterator3_callback(rt_iterator_arg arg, void *userarg, double *value, int *nodata)
static int testRasterIterator4_callback(rt_iterator_arg arg, void *userarg, double *value, int *nodata)
static int testRasterIterator6_callback(rt_iterator_arg arg, void *userarg, double *value, int *nodata)
void * rtalloc(size_t size)
Wrappers used for managing memory.
int32_t rt_raster_get_srid(rt_raster raster)
Get raster's SRID.
double rt_raster_get_x_skew(rt_raster raster)
Get skew about the X axis.
double rt_raster_get_x_offset(rt_raster raster)
Get raster x offset, in projection units.
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.
double rt_raster_get_x_scale(rt_raster raster)
Get scale X in projection units.
rt_errorstate rt_band_set_pixel(rt_band band, int x, int y, double val, int *converted)
Set single pixel's value.
uint16_t rt_raster_get_height(rt_raster raster)
rt_errorstate rt_raster_iterator(rt_iterator itrset, uint16_t itrcount, rt_extenttype extenttype, rt_raster customextent, rt_pixtype pixtype, uint8_t hasnodata, double nodataval, uint16_t distancex, uint16_t distancey, rt_mask mask, void *userarg, int(*callback)(rt_iterator_arg arg, void *userarg, double *value, int *nodata), rt_raster *rtnraster)
n-raster iterator.
uint16_t rt_raster_get_width(rt_raster raster)
void rtdealloc(void *mem)
double rt_raster_get_y_scale(rt_raster raster)
Get scale Y in projection units.
double rt_raster_get_y_skew(rt_raster raster)
Get skew about the Y axis.
void rt_raster_set_offsets(rt_raster raster, double x, double y)
Set insertion points in projection units.
double rt_raster_get_y_offset(rt_raster raster)
Get raster y offset, 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)