Clone an existing raster.
1543 uint32_t *
nband = NULL;
1547 if (
nband == NULL) {
1548 rterror(
"rt_raster_clone: Could not allocate memory for deep clone");
1551 for (i = 0; i < numband; i++)
1565 rterror(
"rt_raster_clone: Could not create cloned raster");
void rterror(const char *fmt,...)
Wrappers used for reporting errors and info.
void * rtalloc(size_t size)
Wrappers used for managing memory.
void rtdealloc(void *mem)
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
int32_t rt_raster_get_srid(rt_raster raster)
Get raster's SRID.
void rt_raster_set_geotransform_matrix(rt_raster raster, double *gt)
Set raster's geotransform using 6-element array.
rt_raster rt_raster_new(uint32_t width, uint32_t height)
Construct a raster with given dimensions.
uint16_t rt_raster_get_num_bands(rt_raster raster)
uint16_t rt_raster_get_height(rt_raster raster)
void rt_raster_set_srid(rt_raster raster, int32_t srid)
Set raster's SRID.
rt_raster rt_raster_from_band(rt_raster raster, uint32_t *bandNums, int count)
Construct a new rt_raster from an existing rt_raster and an array of band numbers.
uint16_t rt_raster_get_width(rt_raster raster)
void rt_raster_get_geotransform_matrix(rt_raster raster, double *gt)
Get 6-element array of raster geotransform matrix.