Package org.geotiff.image.jai

Examples of org.geotiff.image.jai.GeoTIFFDirectory


    }

    protected ImageTile get4326(GeoTIFFImageReader gtid, ImageTile.Cache cache)
            throws IOException {
        // GCS_WGS_84
        GeoTIFFDirectory gtfd = gtfFile.getGtfDirectory();
        // There's got to be a way to figure out the pixel height and width of
        // the image without having to create the BufferedImage. We need those
        // for georeferencing the lower right corner right now, but it would be
        // good to only create the image if an ImageDecoder and cache weren't
        // provided.
        double[] tiePoints = gtfd.getTiepoints();
        double[] scaleMatrix = gtfd.getPixelScale();

        int imageWidth = gtfFile.getFieldIntValue(256);
        int imageHeight = gtfFile.getFieldIntValue(257);

        double ulat = tiePoints[4] + tiePoints[1] * scaleMatrix[1];
 
View Full Code Here


                URL fileURL = PropUtils.getResourceOrFileOrURL(filePath);
                if (fileURL != null) {

                    GeoTIFFFile gtfFile = new GeoTIFFFile(fileURL);
                    BufferedImage bi = gtfFile.getBufferedImage();
                    GeoTIFFDirectory gtfd = gtfFile.getGtfDirectory();
                    double[] tiePoints = gtfd.getTiepoints();

                    System.out.println("------ Tie Point Values ------");
                    for (int i = 0; i < tiePoints.length; i++) {
                        System.out.println(tiePoints[i]);
                    }

                    double[] scaleMatrix = gtfd.getPixelScale();
                    System.out.println("------ Pixel Scale Values ------");
                    for (int i = 0; i < scaleMatrix.length; i++) {
                        System.out.println(scaleMatrix[i]);
                    }
View Full Code Here

TOP

Related Classes of org.geotiff.image.jai.GeoTIFFDirectory

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.