Package org.geotools.coverage.grid

Examples of org.geotools.coverage.grid.GridCoverageFactory.create()


    private GridCoverage convertToGridCoverage( IViewportModel viewportModel, BufferedImage image ) {
        ReferencedEnvelope env = viewportModel.getBounds();

        GridCoverageFactory factory = new GridCoverageFactory();

        GridCoverage2D gc = (GridCoverage2D) factory.create("GridCoverage", image, env); //$NON-NLS-1$
        return gc;
    }


}
View Full Code Here


          DefaultCartesianCS.GENERIC_2D);
    // now create a gridcoverage for the new warped image
    GridCoverageFactory factory = new GridCoverageFactory();
    ReferencedEnvelope ref = new ReferencedEnvelope(0, image.getWidth(null), 0, image.getHeight(null), derivedCRS);

    GridCoverage2D coverage = (GridCoverage2D) factory.create("GridCoverage", image, ref); //$NON-NLS-1$

    // resample the new image with the world CRS
    GridCoverage2D warpedCoverage = null;
    try {
      Operations ops = new Operations(null);
View Full Code Here

        double east = envelopeParams.get(EAST);
        double north = envelopeParams.get(NORTH);
        Envelope2D writeEnvelope = new Envelope2D(crs, west, south, east - west, north - south);
        GridCoverageFactory factory = CoverageFactoryFinder.getGridCoverageFactory(null);

        GridCoverage2D coverage2D = factory.create(name, writableRaster, writeEnvelope);
        return coverage2D;
    }

    /**
     * Creates a {@link WritableRaster writable raster}.
View Full Code Here

        ReferencedEnvelope envelope = new ReferencedEnvelope(minx,maxx,miny,maxy,crs);
       
        String name = "GridCoverage";
       
        GridCoverageFactory factory = new GridCoverageFactory();       
        GridCoverage2D gridCoverage = (GridCoverage2D) factory.create(name,image,envelope);
       
        CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:24882");

        RenderingHints hints = new RenderingHints(Hints.LENIENT_DATUM_SHIFT, Boolean.TRUE);       
        CoverageProcessor processor = new CoverageProcessor(hints);
View Full Code Here

        ReferencedEnvelope envelope = new ReferencedEnvelope(minx,maxx,miny,maxy,crs);
       
        String name = "GridCoverage";
       
        GridCoverageFactory factory = new GridCoverageFactory();       
        GridCoverage2D gridCoverage = (GridCoverage2D) factory.create(name,image,envelope);
       
        CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:24882");

        RenderingHints hints = new RenderingHints(Hints.LENIENT_DATUM_SHIFT, Boolean.TRUE);       
        CoverageProcessor processor = new CoverageProcessor(hints);
View Full Code Here

        GridCoverageFactory factory = new GridCoverageFactory();
       
        // get the tile bounds in the CRS the tiles were drawn in
        ReferencedEnvelope tileBndsMercatorRef = renderJob.projectTileToTileProjectedCrs(tile.getExtent());
       
        GridCoverage2D coverage = (GridCoverage2D) factory.create("GridCoverage", tile.getBufferedImage(), tileBndsMercatorRef); //$NON-NLS-1$       
        
        Envelope2D coveragebounds = coverage.getEnvelope2D();

        // bounds of tile
        ReferencedEnvelope bnds = new ReferencedEnvelope(coveragebounds.getMinX(), coveragebounds.getMaxX(),
View Full Code Here

                            RenderedImage image = coverage.getRenderedImage();
                            ImageWorker iw = new ImageWorker(image);
                            iw.makeColorTransparent(color);
                            image = iw.getRenderedImage();
                            GridCoverageFactory gcF = CoverageFactoryFinder.getGridCoverageFactory(null);
                            coverage = gcF.create(coverage.getName(), image, coverage.getCoordinateReferenceSystem(), coverage
                                    .getGridGeometry().getGridToCRS(), coverage.getSampleDimensions(), null, null);
                        }
                 
                      //setState( RENDERING );
                      paint.paint( graphics, coverage, rasterSymbolizer );                       
View Full Code Here

            throw wrapException(e);
        }

        GridCoverageFactory factory = new GridCoverageFactory();

        GridCoverage2D gc = (GridCoverage2D) factory.create("GridCoverage", image, gtEnv); //$NON-NLS-1$
        return gc;
    }

    @SuppressWarnings("unchecked")
    private void setImageFormat( WebMapServer wms, GetMapRequest request ) {
View Full Code Here

                            RenderedImage image = coverage.getRenderedImage();
                            ImageWorker iw = new ImageWorker(image);
                            iw.makeColorTransparent(color);
                            image = iw.getRenderedImage();
                            GridCoverageFactory gcF = CoverageFactoryFinder.getGridCoverageFactory(null);
                            coverage = gcF.create(coverage.getName(), image, coverage.getCoordinateReferenceSystem(), coverage
                                    .getGridGeometry().getGridToCRS(), coverage.getSampleDimensions(), null, null);
                        }
                     
                      //setState( RENDERING );
                      paint.paint( graphics, coverage, rasterSymbolizer );                       
View Full Code Here

        // create a gridcoverage from the tile image
        Envelope bounds = tile.getBounds();
        GridCoverageFactory factory = new GridCoverageFactory();
        ReferencedEnvelope ref = new ReferencedEnvelope(bounds.getMinX(), bounds.getMaxX(),
                bounds.getMinY(), bounds.getMaxY(), crs);
        GridCoverage2D coverage = (GridCoverage2D) factory.create(
                "GridCoverage", tile.getBufferedImage(), ref); //$NON-NLS-1$       
        Envelope2D coveragebounds = coverage.getEnvelope2D();

        // bounds of tile
        Envelope tilebBounds = new Envelope(coveragebounds.getMinX(), coveragebounds.getMaxX(),
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.