Package org.geoserver.importer.mosaic

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


            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

            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

Related Classes of org.geoserver.importer.mosaic.Mosaic

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.