Examples of UNREDDLayer


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

        //===
        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");
        ul.setAttribute(Attributes.RASTERY0, "-6.5");
        ul.setAttribute(Attributes.RASTERX1, "23");
        ul.setAttribute(Attributes.RASTERY1, "5.1");
        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());
View Full Code Here

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

   * @param url
   * @param path
   * @return
   */
  public  static RESTResource createLayerResource(String name, List<ShortAttribute> optionalAttributes){
        UNREDDLayer layer = new UNREDDLayer();
//        layer.setAttribute(Attributes.DESTRELATIVEPATH, path);

        RESTResource res = layer.createRESTResource();
    res.setName(name);

    if (optionalAttributes!=null) {
            res.getAttribute().addAll(optionalAttributes);
    }
View Full Code Here

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

//        geostoreClient2.setGeostoreRestUrl(gsturld);
//        geostoreClient2.setUsername(gstuserd);
//        geostoreClient2.setPassword(gstpwdd);


        UNREDDLayer layer1 = new UNREDDLayer();

        layer1.setAttribute(UNREDDLayer.Attributes.RASTERPIXELWIDTH, "3876");
        layer1.setAttribute(UNREDDLayer.Attributes.RASTERPIXELHEIGHT, "3562");
        layer1.setAttribute(UNREDDLayer.Attributes.RASTERX0, "-50");
        layer1.setAttribute(UNREDDLayer.Attributes.RASTERX1, "50");
        layer1.setAttribute(UNREDDLayer.Attributes.RASTERY0, "-50");
        layer1.setAttribute(UNREDDLayer.Attributes.RASTERY1, "50");
        layer1.setAttribute(UNREDDLayer.Attributes.RASTERATTRIBNAME, "scene_id");
        layer1.setAttribute(UNREDDLayer.Attributes.MOSAICPATH, "layer1");
        layer1.setAttribute(UNREDDLayer.Attributes.RASTERNODATA, "0.0");

       
        List<RESTResource> resourceList = new ArrayList<RESTResource>();
        resourceList.add(UNREDDResourceBuilder.createLayerResource("layer1", layer1.createRESTResource().getAttribute()));
        resourceList.add(UNREDDResourceBuilder.createLayerResource("layer2", null));
        resourceList.add(UNREDDResourceBuilder.createLayerResource("layer3", null));

        resourceList.add(UNREDDResourceBuilder.createLayerUpdateResource("layer1", "2009", "12", null, null));
        resourceList.add(UNREDDResourceBuilder.createLayerUpdateResource("layer1", "2010", null, null, null));
View Full Code Here

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

        // add a layer
        {
            String mosaicDir = classFile.getAbsoluteFile().getParent();

            UNREDDLayer layer = new UNREDDLayer();
            layer.setAttribute(UNREDDLayer.Attributes.MOSAICPATH, mosaicDir);
            RESTResource layerRes = layer.createRESTResource();
            layerRes.setName(LAYERNAME);
            gstcu.insert(layerRes);
        }

        // add a layerUpdate
View Full Code Here

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

        }

        if(layerRes == null)
            throw new ActionException(this, "Layer not found: "+layername);

        UNREDDLayer layer = new UNREDDLayer(layerRes);

        LOGGER.info("Layer resource found ");

        if( ! layer.getAttribute(Attributes.LAYERTYPE).equalsIgnoreCase(request.getFormat().getName()))
            throw new ActionException(this, "Bad Layer format "
                    + "(declared:"+ request.getFormat().getName()
                    + ", expected:"+layer.getAttribute(Attributes.LAYERTYPE) );

        // this attribute is read for moving the raster file to the destination directory, not for rasterization
        String mosaicDirPath = layer.getAttribute(UNREDDLayer.Attributes.MOSAICPATH);
        if( mosaicDirPath == null) {
            throw new ActionException(this, "Null mosaic directory for layer: '" + layername + "'... check the layer configuration on geostore");
        }

        File mosaicDir = new File(mosaicDirPath);
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.