Handle map algebra on images with different max zoom levels
Closed this issue · 1 comments
For example, adding two images that were ingested to different zoom levels.
Looking at the code, I suspect the best place to handle that would be in the MrsPyramidRecordReader. We could add a zoom level to the MrsPyramidInputSplit that will contain the max zoom level of the image. Then in the record reader, if the zoom level specified in the InputInputFormatContext differs from the zoom in the split, then handle the tile re-sampling in the nextKeyValue method. For example, if the image's zoom level is lower-res, then each call to nextKeyValue would not actually read the next key from the actual source, but it might return a higher-res tile computed from the actual source tile (by duplicating the source pixels into the higher res tile as needed). That is the case where we go from zoom 9 to zoom 10 for example. For each tile the reader processes at zoom 9, it would actually have to return up to four tiles at zoom ten.