Package org.geotools.coverageio.jp2k

Examples of org.geotools.coverageio.jp2k.Granule


             return;
        }
        
    final AbstractGridCoverage2DReader reader = new JP2KReader(file);
    final GeneralEnvelope envelope = reader.getOriginalEnvelope();
    final Granule granule = new Granule(new ReferencedEnvelope(envelope), file);
    final Level level = granule.getLevel(0);
    if (level != null){
      final AffineTransform btl = level.getBaseToLevelTransform();
        assertTrue(btl.isIdentity());
        final Rectangle bounds = level.getBounds();
        assertEquals(bounds.width, 400);
          assertEquals(bounds.height, 200);
        final int h = level.getHeight();
        final int w = level.getWidth();
        assertEquals(bounds.width, w);
          assertEquals(bounds.height, h);
         
        final double sx = level.getScaleX();
        final double sy = level.getScaleY();
        assertEquals(sx, 1.0, DELTA);
          assertEquals(sy, 1.0, DELTA);
          
        final String levelS = level.toString();
        if (TestData.isInteractiveTest()){
             if (LOGGER.isLoggable(java.util.logging.Level.INFO))
               LOGGER.info(levelS);
          }
      }
     
      final String granuleS = granule.toString();
      if (TestData.isInteractiveTest()){
           if (LOGGER.isLoggable(java.util.logging.Level.INFO))
             LOGGER.info(granuleS);
        }
     
View Full Code Here

TOP

Related Classes of org.geotools.coverageio.jp2k.Granule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.