Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MosaicOpImage won't produce suitable outputs without alpha, ROI or NoData #225

Closed
aaime opened this issue Dec 4, 2018 · 2 comments
Closed

Comments

@aaime
Copy link
Member

aaime commented Dec 4, 2018

In case no other source selection mechanism is used (no alpha, no ROI, no NoData) the mosaic will simply generate in output its first input image, with padding.
This is how it works:

  • Each input image is padded to the extends of the output via a BorderOpImage (inefficient, the original operation used source.getExtendedData instead, which could use optimizations such as generating child rasters or use arraycopy to copy over data, while the BorderOpImage does a pixel by pixel check (for nodata) and copy
  • While looping over the data, if no other mechanism to detect input validity is used, then the pixel is unconditionally accepted as valid (the original mosaic op used the thresholds instead), even if it was not part of the original image

The thresholds are not used at all (see #224) but regardless of that, the code should be checking the input raster extents and avoid pulling pixels out of extended pixels, shouldn't it?

@aaime
Copy link
Member Author

aaime commented Dec 5, 2018

Going to make it work over the original source rectangle, skipping pixel processing for sources that are not providing any actual value for the current position

@aaime
Copy link
Member Author

aaime commented Dec 7, 2018

Resolved in 1.1.x

@aaime aaime closed this as completed Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant