Examples of Mosaic


Examples of it.geosolutions.geobatch.unredd.script.util.Mosaic

              bbox[0] = Double.valueOf(layerResource.getAttribute(Attributes.RASTERX0));
              bbox[1] = Double.valueOf(layerResource.getAttribute(Attributes.RASTERY0));
              bbox[2] = Double.valueOf(layerResource.getAttribute(Attributes.RASTERX1));
              bbox[3] = Double.valueOf(layerResource.getAttribute(Attributes.RASTERY1));
             
              Mosaic mosaic = new Mosaic(conf.getDstGeoServerConfig(), mosaicDir, getTempDir(), getConfigDir());
              mosaic.add(conf.getDstGeoServerConfig().getWorkspace(), layerName, srcRasterFile, "EPSG:4326", bbox, style, conf.getDatastorePath());
          }

        } catch (PostGisException e) {
            LOGGER.debug("Property settings : [Layer = " + layerName + ", year = " + year + ", month=" + month + "]");
            throw new ActionException(this, "Error while copying features", e );
View Full Code Here

Examples of it.geosolutions.geobatch.unredd.script.util.Mosaic

            bbox[0] = Double.valueOf(layer.getAttribute(Attributes.RASTERX0));
            bbox[1] = Double.valueOf(layer.getAttribute(Attributes.RASTERY0));
            bbox[2] = Double.valueOf(layer.getAttribute(Attributes.RASTERX1));
            bbox[3] = Double.valueOf(layer.getAttribute(Attributes.RASTERY1));
           
            Mosaic mosaic = new Mosaic(cfg.getGeoServerConfig(), mosaicDir, getTempDir(), getConfigDir());
            mosaic.add(cfg.getGeoServerConfig().getWorkspace(), layername, rasterFile, "EPSG:4326", bbox, style, cfg.getDatastorePath());
       
        } catch (Exception e) {
            this.listenerForwarder.progressing(60, "Error in ImageMosaic: " + e.getMessage());
            LOGGER.error("Error in ImageMosaic: " + e.getMessage(), e);
            throw new ActionException(this, "Error updating mosaic " + rasterFile.getName(), e);
View Full Code Here

Examples of org.geoserver.importer.mosaic.Mosaic

        fileChooser.setFilter(new Model((Serializable)DirectoryFileFilter.DIRECTORY));
    }

    @Override
    public ImportData createImportSource() throws IOException {
        return new Mosaic(new File(this.file));
    }
View Full Code Here

Examples of org.geoserver.importer.mosaic.Mosaic

            for (int j = 0; j < aux.length; j++) {
                new File(unpack, file.getName().replace("tif",aux[j])).createNewFile();
            }
        }

        Mosaic m = new Mosaic(unpack);
        m.prepare();

        assertEquals(4, m.getFiles().size());
        for (int i = 0; i < m.getFiles().size(); i++) {
            assertEquals("GeoTIFF", m.getFiles().get(1).getFormat().getName());
        }
        // make sure the junk was actually picked up
        for (FileData f: m.getFiles()) {
            assertEquals(aux.length, ((SpatialFile) f).getSuppFiles().size());
        }
    }
View Full Code Here

Examples of org.geoserver.importer.mosaic.Mosaic

            return new FileData((File)null);
        }
    }

    Mosaic mosaic(JSONObject json) throws IOException {
        Mosaic m = new Mosaic(json.has("location") new File(json.getString("location")) :
            Directory.createNew(importer.getUploadRoot()).getFile());
        if (json.has("name")) {
            m.setName(json.getString("name"));
        }
        if (json.containsKey("time")) {
            JSONObject time = json.getJSONObject("time");
            if (!time.containsKey("mode")) {
                throw new IllegalArgumentException("time object must specific mode property as " +
                    "one of " + TimeMode.values());
            }

            m.setTimeMode(TimeMode.valueOf(time.getString("mode").toUpperCase()));
            m.getTimeHandler().init(time);
        }
        return m;
    }
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.