Package it.geosolutions.unredd.geostore.model

Examples of it.geosolutions.unredd.geostore.model.UNREDDLayerUpdate


                float minorStep = layerUpsCnt++ / layerUps;
                String msg = "Starting reprocessing StatsDef:" + statsDefName + " Layer:" + layerName + " LayerUpdate:" + layerUpdateRes.getName();
                LOGGER.info(msg);
                this.listenerForwarder.progressing(rescale(min, max, majorStep*(1+minorStep)), msg);

                UNREDDLayerUpdate layerUpdate = new UNREDDLayerUpdate(layerUpdateRes);
                String year = layerUpdate.getAttribute(UNREDDLayerUpdate.Attributes.YEAR);
                String month = layerUpdate.getAttribute(UNREDDLayerUpdate.Attributes.MONTH);
                String day = layerUpdate.getAttribute(UNREDDLayerUpdate.Attributes.DAY);

                String rasterPath = layer.getAttribute(Attributes.MOSAICPATH);
                String rasterFile = NameUtils.buildTifFileName(layerName, year, month, day);
                String rasterFullPath = new File(rasterPath, rasterFile).getAbsolutePath();

View Full Code Here


            layerUpdatesRes = geoStoreUtil.searchLayerUpdate(layerName, year, month, day);
        } catch (GeoStoreException e) {
            throw new ActionException(this, "LayerUpdate not createds: " + layerName, e);
        }

        UNREDDLayerUpdate layerUpdate = new UNREDDLayerUpdate(layerUpdatesRes);

        // ========================================
        // In case of update we should regenerate the tiff.
        // We have also retile, overview it and move it to the mosaic directory
View Full Code Here

        UNREDDLayer layer = buildRasterLayer();
        RESTResource layerResource = layer.createRESTResource();
        layerResource.setName("layer1");
        gstcu.insert(layerResource);

        UNREDDLayerUpdate layerUpdate = new UNREDDLayerUpdate();
        layerUpdate.setAttribute(Attributes.YEAR, "2012");
        layerUpdate.setAttribute(Attributes.LAYER, "layer1");
        RESTResource luResource = layerUpdate.createRESTResource();
        luResource.setName(NameUtils.buildLayerUpdateName("layer1", "2012", null, null));
        gstcu.insert(luResource);

        //=== Data is set, prepare flow
        LOGGER.info("===== Run the code!");
View Full Code Here

//        config.setExecutable(gdalpath);
//        config.setFreeMarkerTemplate("commongdalrasterizeshp.xml");
//        config.setTaskExecutorXslFileName("commongdalrasterize.xsl");

        //===
        UNREDDLayerUpdate ulu = new UNREDDLayerUpdate();
        ulu.setAttribute(it.geosolutions.unredd.geostore.model.UNREDDLayerUpdate.Attributes.LAYER, "layer1_2012");
        ulu.setAttribute(it.geosolutions.unredd.geostore.model.UNREDDLayerUpdate.Attributes.YEAR, "2012");

        UNREDDLayer ul = new UNREDDLayer();
        ul.setAttribute(Attributes.RASTERATTRIBNAME, "scene_id");
        ul.setAttribute(Attributes.RASTERNODATA, "0.0");
        ul.setAttribute(Attributes.RASTERX0, "21");
View Full Code Here

  }

   
  public static RESTResource createLayerUpdateResource(String name, String year, String month, String day, String content){

        UNREDDLayerUpdate layerUpdate = new UNREDDLayerUpdate();

        layerUpdate.setAttribute(UNREDDLayerUpdate.Attributes.LAYER, name);
        layerUpdate.setAttribute(UNREDDLayerUpdate.Attributes.YEAR, year);
    if (month!=null) {
            layerUpdate.setAttribute(UNREDDLayerUpdate.Attributes.MONTH, month);
        }

        RESTResource res = layerUpdate.createRESTResource();
    res.setName(NameUtils.buildLayerUpdateName(name, year, month, day));
        res.setData(content);

        return res;
  }
View Full Code Here

        return res;
    }

    protected static  RESTResource createLayerUpdate(String layername, String year, String month, String day) {
        UNREDDLayerUpdate layerUpdate = new UNREDDLayerUpdate();
        layerUpdate.setAttribute(UNREDDLayerUpdate.Attributes.LAYER, layername);
        layerUpdate.setAttribute(UNREDDLayerUpdate.Attributes.YEAR, year);
        if (month != null) {
            layerUpdate.setAttribute(UNREDDLayerUpdate.Attributes.MONTH, month);
        }
        if (day != null) {
            layerUpdate.setAttribute(UNREDDLayerUpdate.Attributes.DAY, day);
        }
        RESTResource res = layerUpdate.createRESTResource();
        String resName = NameUtils.buildLayerUpdateName(layername, year, month, day);
        res.setName(resName);
        return res;
    }
View Full Code Here

        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

Related Classes of it.geosolutions.unredd.geostore.model.UNREDDLayerUpdate

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.