449 {
451 uint16_t i = 0;
452
453 assert(NULL != raster);
454
455 RASTER_DEBUGF(3,
"rt_raster_wkb_size: computing size for %d bands",
457
458 for (i = 0; i <
raster->numBands; ++i) {
462
463 RASTER_DEBUGF(3,
"rt_raster_wkb_size: adding size of band %d", i);
464
465 if (pixbytes < 1) {
466 rterror(
"rt_raster_wkb_size: Corrupted band: unknown pixtype");
467 return 0;
468 }
469
470
471 size += 1;
472
473
474 size += pixbytes;
475
476 if (!outasin &&
band->offline) {
477
478 size += 1;
479
480
481 size += strlen(
band->data.offline.path) + 1;
482 }
483 else {
484
486 }
487 }
488
489 return size;
490}
void rterror(const char *fmt,...) __attribute__((format(printf
Wrappers used for reporting errors and info.
#define RASTER_DEBUGF(level, msg,...)
int rt_pixtype_size(rt_pixtype pixtype)
Return size in bytes of a value in the given pixtype.
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...