Package org.geotools.coverage.grid.io

Examples of org.geotools.coverage.grid.io.AbstractGridFormat.accepts()


        //
        // use prj and wld
        //
        final File wldprjFile = TestData.file(GeoTiffReaderTest.class, "no_crs_no_envelope.tif");
        assertTrue(format.accepts(wldprjFile));

        // getting a reader
        reader = new GeoTiffReader(wldprjFile);

        // reading the coverage
View Full Code Here


        //
        // use prj and hint
        //
        final File wldFile = TestData.file(GeoTiffReaderTest.class, "no_crs_no_envelope2.tif");
        assertTrue(format.accepts(wldFile));

        // getting a reader
        reader = new GeoTiffReader(wldFile, hint);

        // reading the coverage
View Full Code Here

          // testing file
          o = files[i];
        else
          // testing url
          o = files[i].toURI().toURL();
        if (format.accepts(o)) {
          buffer.append("ACCEPTED").append("\n");
   
          // getting a reader
          GeoTiffReader reader = new GeoTiffReader(o, new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE));
          if (reader != null) {
View Full Code Here

            final GeoTiffWriter writer= new GeoTiffWriter(destFile);
            writer.write(coverage, null);
            writer.dispose();
           
            // read back
            assertTrue(format.accepts(destFile));
            reader = new GeoTiffReader(destFile, new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE));
            final GridCoverage2D destCoverage = (GridCoverage2D) reader.read(null);
            reader.dispose();
           
            final double eps=XAffineTransform.getScaleX0((AffineTransform)coverage.getGridGeometry().getGridToCRS())*1E-2;
 
View Full Code Here

    public void testTransparencySettings() throws Exception {

       
        final AbstractGridFormat format = new GeoTiffFormat();
        File file = TestData.file(GeoTiffReaderTest.class,"002025_0100_010722_l7_01_utm2.tiff");       
        if (format.accepts(file)) {
            // getting a reader
            GeoTiffReader reader = new GeoTiffReader(file, new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE));
            if (reader != null) {
                // reading the coverage
                GridCoverage2D coverage = (GridCoverage2D) reader.read(null);
View Full Code Here

        } else
            assertFalse(true); // we should not get here

       
        file = TestData.file(GeoTiffReaderTest.class,"gaarc_subset.tiff");       
        if (format.accepts(file)) {
            // getting a reader
            GeoTiffReader reader = new GeoTiffReader(file, new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE));
            if (reader != null) {
                // reading the coverage
                GridCoverage2D coverage = (GridCoverage2D) reader.read(null);
View Full Code Here

        } else
            assertFalse(true); // we should not get here
       
        // now we test that we cannot do colormasking on a non-rendered output
        file = TestData.file(GeoTiffReaderTest.class,"wind.tiff");       
        if (format.accepts(file)) {
            // getting a reader
            GeoTiffReader reader = new GeoTiffReader(file, new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE));
            if (reader != null) {
                // reading the coverage
                GridCoverage2D coverage = (GridCoverage2D) reader.read(null);
View Full Code Here

    //
    // Get a reader
    //
    final AbstractGridFormat format = new ImagePyramidFormat();
    assertTrue(format.accepts(testFile));
    final ImagePyramidReader reader = (ImagePyramidReader) format
        .getReader(testFile);
    assertNotNull(reader);
         
    //
View Full Code Here

    //
    // Get a reader
    //
    final AbstractGridFormat format = new ImagePyramidFormat();
    assertTrue(format.accepts(testFile));
    final ImagePyramidReader reader = (ImagePyramidReader) format
        .getReader(testFile);
    assertNotNull(reader);

    //
View Full Code Here

    //
    // Get a reader
    //
    final AbstractGridFormat format = new ImagePyramidFormat();
    assertTrue(format.accepts(testFile));
    final ImagePyramidReader reader = (ImagePyramidReader) format
        .getReader(testFile);
    assertNotNull(reader);

    //
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.