Heterogeneous CRS mosaic composes output with erroenous image positioning and scaling

Description

Multiple issues found:

  • The GranuleDescritpor is in some paths getting no notice that the mosaic is heterogeneous

  • GranuleDescriptor image positioning via affine transform performs math in the target mosaic CRS instead of the granule one, building a grid to world for the granule that just uses the bbox in target CRS and the raster size

  • The reprojection machinery georeferences each single CRS mosaic assuming its bbox is the union of all granules footprints, but the read normally only reads part of a granule (this results in heavy image stretching if only a small portion of the image is displaying)

Environment

None

Activity

Show:
Andrea Aime
May 10, 2017, 1:10 PM

Merged on master (18.x), since the changes are extensive I'll wait some time before backporting to the stable series (the 17.1 release is too close)

Andrea Aime
May 5, 2017, 8:29 AM

Before the fixes, visible issues in a mosaic with multiple partial overlapping granules fully covering the requested area:

  • Black pixels at borders

  • Images are not sticthing properly, granule borders are visible

And after the fixes:

Andrea Aime
May 5, 2017, 8:22 AM

Added a screencast showing how the wrong scaling and positioning affects image output when zooming in and out

Andrea Aime
May 5, 2017, 8:19 AM

Added illustration of the issue number 2 ("GranuleDescriptor image positioning via affine transform performs math in the target mosaic CRS instead of the granule one, building a grid to world for the granule that just uses the bbox in target CRS and the raster size")

Fixed

Assignee

Andrea Aime

Reporter

Andrea Aime

Triage

None

Components

Fix versions

Priority

Medium