vapour
vapour copied to clipboard
get IMAGE_STRUCTURE metadata
how?
// FIXME: this is unused, how to get the compression type if present?
// char **MDdomain = GDALGetMetadataDomainList(hDataset);
//
// int mdi = 0; // iterate though MetadataDomainList
// int imgstruct_i = -1;
// bool has_compress = false;
// while (MDdomain && MDdomain[mdi] != NULL) {
// if (strcmp(MDdomain[mdi], "IMAGE_STRUCTURE") == 0) {
// Rprintf("it has it\n");
// imgstruct_i = mdi;
// }
// mdi++;
// }
// //cleanup
// CSLDestroy(MDdomain);
// char **papszMetadata = GDALGetMetadata( hDataset, "IMAGE_STRUCTURE" );
// int imsi = 0; // iterate though IMAGE_STRUCTURE list
// int imgstruct_i = -1;
// bool has_compress = false;
// while (papszMetadata && papszMetadata[imsi] != NULL) {
// if (strcmp(papszMetadata[imsi], "COMPRESSION") == 0) {
// Rprintf("it has it\n");
// imgstruct_i = imsi;
// }
// imsi++;
// }
// //cleanup
// CSLDestroy(papszMetadata);
this can be got from the json output used in vapour_raster_info