Examples of GeoTiffMetadata2CRSAdapter


Examples of org.geotools.coverage.grid.imageio.geotiff.metadata.GeoTiffMetadata2CRSAdapter

            //
            // get the CRS INFO
            //
            // //
            // metadata decoder           
            GeoTiffMetadata2CRSAdapter gtcs=new GeoTiffMetadata2CRSAdapter(hints);
            final Object tempCRS = this.hints.get(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM);
            if (tempCRS != null) {
                this.crs = (CoordinateReferenceSystem) tempCRS;
                if (LOGGER.isLoggable(Level.FINE))
                    LOGGER.log(Level.FINE, "Using forced coordinate reference system");
            } else {

                // check metadata first
                if (metadata.hasGeoKey()&& gtcs != null)
                    crs = gtcs.createCoordinateSystem(metadata);

                if (crs == null)
                    crs = GeoTiffUtils.getCRS(source);
            }
View Full Code Here

Examples of org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter

            // //
            //
            // CRS INFO
            //
            // //
            GeoTiffMetadata2CRSAdapter gtcs = null;
            final Object tempCRS = this.hints.get(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM);
            if (tempCRS != null) {
                crs = (CoordinateReferenceSystem) tempCRS;
                if (LOGGER.isLoggable(Level.FINE))
                    LOGGER.log(Level.FINE, "Using forced coordinate reference system");
            } else {

                // metadata decoder
                gtcs=new GeoTiffMetadata2CRSAdapter(hints);
                // check metadata first
                if (decoder.hasGeoKey()&& gtcs != null)
                    try {
                        crs = gtcs.createCoordinateSystem(decoder);
                    } catch (FactoryException e) {
                       throw new IOException(e);
                    }

                if (crs == null)
View Full Code Here

Examples of org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter

            // //
            inStream.mark();
            reader.setInput(inStream);
            final IIOMetadata iioMetadata = reader.getImageMetadata(0);
            final GeoTiffIIOMetadataDecoder metadata = new GeoTiffIIOMetadataDecoder(iioMetadata);
            gtcs = new GeoTiffMetadata2CRSAdapter(hints);
           
            // //
            //
            // get the CRS INFO
            //
View Full Code Here

Examples of org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter

         final TIFFImageReader tiffreader = (TIFFImageReader) new TIFFImageReaderSpi().createReaderInstance();
         tiffreader.setInput(ImageIO.createImageInputStream(inputStream));
         final IIOMetadata tiffmetadata = tiffreader.getImageMetadata(0);
         try {
            final GeoTiffIIOMetadataDecoder metadataDecoder = new GeoTiffIIOMetadataDecoder(tiffmetadata);
            final GeoTiffMetadata2CRSAdapter adapter = new GeoTiffMetadata2CRSAdapter(hints);
             coordinateReferenceSystem = adapter.createCoordinateSystem(metadataDecoder);
             if (coordinateReferenceSystem != null) {
               if (this.crs == null)
                 this.crs = coordinateReferenceSystem;
             }
             if (this.raster2Model == null){
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.