@Test public void testHeterogeneous() throws Exception { final URL testMosaic = TestData.url(this, "heterogeneous"); ImageMosaicReader reader = null; try { reader = new ImageMosaicFormat().getReader(testMosaic); final ParameterValue<GridGeometry2D> gg = AbstractGridFormat.READ_GRIDGEOMETRY2D.createValue(); final GeneralEnvelope envelope = reader.getOriginalEnvelope(); final Dimension dim = new Dimension(); dim.setSize(10, 20); final Rectangle rasterArea = ((GridEnvelope2D) reader.getOriginalGridRange()); rasterArea.setSize(dim); final GridEnvelope2D range = new GridEnvelope2D(rasterArea); GridGeometry2D gridGeometryValue = new GridGeometry2D(range, envelope); gg.setValue(gridGeometryValue); final RasterManager manager = reader.getRasterManager(reader.getGridCoverageNames()[0]); final RasterLayerRequest request = new RasterLayerRequest(new GeneralParameterValue[] {gg}, manager); final RasterLayerResponse response = new RasterLayerResponse( request, manager, new DefaultSubmosaicProducerFactory()); final Class<?> c = response.getClass(); Method method = c.getDeclaredMethod("prepareResponse"); method.setAccessible(true); method.invoke(response); Field finalGridToWorldCorner = c.getDeclaredField("finalGridToWorldCorner"); finalGridToWorldCorner.setAccessible(true); MathTransform2D transform = (MathTransform2D) finalGridToWorldCorner.get(response); AffineTransform2D affineTransform = (AffineTransform2D) transform; AffineTransform2D gridToCRS = (AffineTransform2D) gridGeometryValue.getGridToCRS2D(); assertEquals( gridToCRS.getScaleX(), XAffineTransform.getScaleX0(affineTransform), DELTA); assertEquals( Math.abs(gridToCRS.getScaleY()), XAffineTransform.getScaleY0(affineTransform), DELTA); } finally { if (reader != null) { try { reader.dispose(); } catch (Throwable t) { } } } }
public RasterManager getRasterManager() { return rasterManager; }
RasterLayerResponse { public RasterManager getRasterManager() { return rasterManager; } }
RasterLayerResponse { public RasterManager getRasterManager() { return rasterManager; } RasterLayerResponse(
            final RasterLayerRequest request,
            final RasterManager rasterManager,
            SubmosaicProducerFactory collectorsFactory); }
RasterLayerResponse { public RasterManager getRasterManager() { return rasterManager; } RasterLayerResponse(
            final RasterLayerRequest request,
            final RasterManager rasterManager,
            SubmosaicProducerFactory collectorsFactory); GridCoverage2D createResponse(); RasterLayerRequest getOriginatingCoverageRequest(); RasterLayerRequest getRequest(); FootprintBehavior getFootprintBehavior(); ImageReadParam getBaseReadParameters(); MathTransform2D getFinalGridToWorldCorner(); MathTransform2D getFinalWorldToGridCorner(); ReferencedEnvelope getMosaicBBox(); Color getFinalTransparentColor(); Rectangle getRasterBounds(); MathTransform getBaseGridToWorld(); int getImageChoice(); void setImageChoice(int imageChoice); boolean isMultithreadingAllowed(); RasterManager getRasterManager(); Hints getHints(); void setGranulesPaths(String granulesPaths); void addGranulePaths(String granulesPaths); void setSourceUrl(URL sourceUrl); int getDefaultArtifactsFilterThreshold(); double getArtifactsFilterPTileThreshold(); double[] getBackgroundValues(); ROIExcessGranuleRemover getExcessGranuleRemover(); Geometry getGeometryMask(); double getMaskingBufferPixels(); boolean isSetRoiProperty(); boolean isHeterogeneousCRS(); RasterLayerResponse reprojectTo(GranuleDescriptor templateDescriptor); }
RasterLayerResponse { public RasterManager getRasterManager() { return rasterManager; } RasterLayerResponse(
            final RasterLayerRequest request,
            final RasterManager rasterManager,
            SubmosaicProducerFactory collectorsFactory); GridCoverage2D createResponse(); RasterLayerRequest getOriginatingCoverageRequest(); RasterLayerRequest getRequest(); FootprintBehavior getFootprintBehavior(); ImageReadParam getBaseReadParameters(); MathTransform2D getFinalGridToWorldCorner(); MathTransform2D getFinalWorldToGridCorner(); ReferencedEnvelope getMosaicBBox(); Color getFinalTransparentColor(); Rectangle getRasterBounds(); MathTransform getBaseGridToWorld(); int getImageChoice(); void setImageChoice(int imageChoice); boolean isMultithreadingAllowed(); RasterManager getRasterManager(); Hints getHints(); void setGranulesPaths(String granulesPaths); void addGranulePaths(String granulesPaths); void setSourceUrl(URL sourceUrl); int getDefaultArtifactsFilterThreshold(); double getArtifactsFilterPTileThreshold(); double[] getBackgroundValues(); ROIExcessGranuleRemover getExcessGranuleRemover(); Geometry getGeometryMask(); double getMaskingBufferPixels(); boolean isSetRoiProperty(); boolean isHeterogeneousCRS(); RasterLayerResponse reprojectTo(GranuleDescriptor templateDescriptor);  }