const char* pszProjectionRef = NULL;
rt_raster rast = NULL;
+ int numbands = 0;
+ rt_band band = NULL;
char *hex;
uint32_t hexlen = 0;
/* out-db raster */
if (config->outdb) {
- rt_band band = NULL;
-
GDALClose(hdsSrc);
/* each tile is a raster */
return 0;
}
+ /* inspect each band of raster where band is NODATA */
+ rt_band_check_is_nodata(band);
+
/* add band to raster */
if (rt_raster_add_band(rast, band, rt_raster_get_num_bands(rast)) == -1) {
rterror(_("convert_raster: Could not add offlineband to raster"));
/* set srid if provided */
rt_raster_set_srid(rast, info->srid);
+ /* inspect each band of raster where band is NODATA */
+ numbands = rt_raster_get_num_bands(rast);
+ for (i = 0; i < numbands; i++) {
+ band = rt_raster_get_band(rast, i);
+ if (band != NULL)
+ rt_band_check_is_nodata(band);
+ }
+
/* convert rt_raster to hexwkb */
hex = rt_raster_to_hexwkb(rast, &hexlen);
raster_destroy(rast);
*ptr += sz + 1;
/* TODO: How could we know if the offline band is a nodata band? */
- band->isnodata = FALSE;
+ /* trust in the force */
+ /*band->isnodata = FALSE;*/
}
return band;
}