@Test
  @Ignore
public void testExternalOverviews() throws Exception {

    final File file = TestData.file(GeoTiffReaderTest.class, "ovr.tif");
    assertNotNull(file);
    assertEquals(true, file.exists());
    GeoTiffReaderTester reader = new GeoTiffReaderTester(file);
    
    final int nOvrs = reader.getNumOverviews();
    LOGGER.info("Number of external levels: " + nOvrs);
    assertEquals(4, nOvrs);
    double[][] overviewResolutions = reader.getOverviewResolutions();
    assertEquals(overviewResolutions.length, 4);
    final ParameterValue<GridGeometry2D> gg = AbstractGridFormat.READ_GRIDGEOMETRY2D.createValue();
    final GeneralEnvelope envelope = reader.getOriginalEnvelope();
    final Dimension dim = new Dimension();
    dim.setSize(reader.getOriginalGridRange().getSpan(0) / 2.0, reader.getOriginalGridRange()
            .getSpan(1) / 2.0);
    Rectangle rasterArea = ((GridEnvelope2D) reader.getOriginalGridRange());
    rasterArea.setSize(dim);
    GridEnvelope2D range = new GridEnvelope2D(rasterArea);
    gg.setValue(new GridGeometry2D(range, envelope));
    GridCoverage2D coverage = reader.read(new GeneralParameterValue[] { gg });
    RenderedImage image = coverage.getRenderedImage();
    assertEquals(image.getWidth(), 180);
    assertEquals(image.getHeight(), 90);
    
    dim.setSize(reader.getOriginalGridRange().getSpan(0) / 4.0, reader.getOriginalGridRange()
            .getSpan(1) / 4.0);
    rasterArea = ((GridEnvelope2D) reader.getOriginalGridRange());
    rasterArea.setSize(dim);
    range = new GridEnvelope2D(rasterArea);
    gg.setValue(new GridGeometry2D(range, envelope));
    coverage = reader.read(new GeneralParameterValue[] { gg });
    image = coverage.getRenderedImage();
    assertEquals(image.getWidth(), 90);
    assertEquals(image.getHeight(), 45);
    final double delta = 0.00001;
    assertEquals(overviewResolutions[0][0], 2.0, delta);
    assertEquals(overviewResolutions[0][1], 2.0, delta);
    assertEquals(overviewResolutions[1][0], 4.0, delta);
    assertEquals(overviewResolutions[1][1], 4.0, delta);
    assertEquals(overviewResolutions[2][0], 8, delta);
    assertEquals(overviewResolutions[2][1], 7.826086956, delta);
    assertEquals(overviewResolutions[3][0], 15.6521739, delta);
    assertEquals(overviewResolutions[3][1], 15, delta);
}