Examples of GDALRasterize


Examples of it.geosolutions.geobatch.unredd.script.util.rasterize.GDALRasterize

        LOGGER.info("Regenerating raster for " + NameUtils.buildLayerUpdateName(layername, year, month, day));

        File rasterFile = null;
        try {
            RasterizeConfig rasterizeConfig = conf.getRasterizeConfig();
            GDALRasterize rasterize = new GDALRasterize(rasterizeConfig, conf.getConfigDir(), this.getTempDir());
            rasterFile = rasterize.run(layer, layerUpdate, conf.getPostGisConfig());

        } catch(Exception e) {
            throw new ActionException(this, "Exception while rasterizing: " + e.getMessage(), e);
        }
View Full Code Here

Examples of it.geosolutions.geobatch.unredd.script.util.rasterize.GDALRasterize

        ul.setAttribute(Attributes.RASTERPIXELHEIGHT, "3562");
        ul.setAttribute(Attributes.RASTERPIXELWIDTH, "3876");
        ul.setAttribute(Attributes.RASTERDATATYPE, "byte");


        GDALRasterize rasterize = new GDALRasterize( rasterizeConfig, rasterizeConfigDir, getTempDir());
//        File errorFile = File.createTempFile("error", ".xml", getTempDir());

        File shp = loadFile("shp/layer1/layer1_2012.shp");
        String shpPath = shp.getAbsolutePath();
        LOGGER.info("ShapeFile path is " + shpPath);
//        options.setSrc(shpPath);

        File outfile = new File(getTempDir(), "output.tif");
        LOGGER.info("Output tif path is " + outfile);

        File outputFile = null;
        try {
            outputFile = rasterize.run(ul, ulu, shp);
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.toString());
        }
View Full Code Here

Examples of it.geosolutions.geobatch.unredd.script.util.rasterize.GDALRasterize

        File rasterFile;
        LOGGER.info("Starting rasterization");
        this.listenerForwarder.progressing(30, "Starting rasterization");
        try {
            GDALRasterize rasterize = new GDALRasterize( cfg.getRasterizeConfig(), cfg.getConfigDir(), getTempDir());
            rasterFile = rasterize.run(layer, new UNREDDLayerUpdate(layername, year, month, day), dataFile);
        } catch (Exception e) {
            throw new ActionException(this, "Error while rasterizing "+dataFile+": " + e.getMessage(), e);
        }

        LOGGER.info("Starting overviews");
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.