Package org.geotools.gce.imagemosaic

Examples of org.geotools.gce.imagemosaic.ImageMosaicFormat


        // the datastore.properties file is also mandatory...
        File dsp =  TestData.file(this,"datastore.properties");
        FileUtils.copyFileToDirectory(dsp, mosaic);

        // have the reader harvest it
        ImageMosaicFormat format = new ImageMosaicFormat();
        ImageMosaicReader reader = format.getReader(mosaic);
        assertNotNull(reader);
       
        // Checking whether different sample images have been created
        final File sampleImage1 = new File(TestData.file(this,"."),"nc_sampleimages/BrOsample_image");
        final File sampleImage2 = new File(TestData.file(this,"."),"nc_sampleimages/NO2sample_image");
View Full Code Here


    @Ignore
        public void oracle() throws IOException, ParseException, NoSuchAuthorityCodeException, FactoryException {
                final File workDir=new File("C:\\data\\dlr\\ascatL1_mosaic");
               
           
                final AbstractGridFormat format = new ImageMosaicFormat();
                assertNotNull(format);
                ImageMosaicReader reader = (ImageMosaicReader) format.getReader(workDir.toURI().toURL());
                assertNotNull(format);
                String[] names = reader.getGridCoverageNames();
                String name = names[1];

               
View Full Code Here

            }
        }
       
        // scan each subdirectory and try to build a mosaic in it, accumulate the resulting mosaics
        List<MosaicInfo> mosaics = new ArrayList<MosaicInfo>();
        ImageMosaicFormat mosaicFactory = new ImageMosaicFormat();
        for (File subdir : directories) {
            if(mosaicFactory.accepts(subdir, hints)) {
                if(LOGGER.isLoggable(Level.FINE)){
                    LOGGER.fine("Trying to build mosaic for the directory:"+subdir.getAbsolutePath());
                }               
                mosaics.add(new MosaicInfo(subdir, mosaicFactory.getReader(subdir, hints)));
            } else {
                if(LOGGER.isLoggable(Level.INFO)){
                    LOGGER.info("Unable to build mosaic for the directory:"+subdir.getAbsolutePath());
                }
            }
View Full Code Here

        finally {
            dir.dispose();
        }

        // have the image mosaic write the property file
        ImageMosaicFormat format = new ImageMosaicFormat();
        ImageMosaicReader reader = format.getReader(mosaic.getFile());
        reader.dispose();
       
        // if we have to add the time, do so now
        if (mosaic.getTimeMode() != TimeMode.NONE) {
            File propertyFile = new File(mosaic.getFile(), mosaic.getName() + ".properties");
View Full Code Here

        final GeoServerAjaxFormLink createStoreLink = new GeoServerAjaxFormLink( "createStore" ) {
            @Override
            public void onClick(AjaxRequestTarget target, Form form) {
                final String layerGroupName = getNonNullGroupName(target);
                if(layerGroupName != null) {
                    CoverageStoreNewPage coverageStoreCreator = new CoverageStoreNewPage(new ImageMosaicFormat().getName()) {
                        protected void onSuccessfulSave(org.geoserver.catalog.CoverageStoreInfo info, org.geoserver.catalog.Catalog catalog, org.geoserver.catalog.CoverageStoreInfo savedStore) {
                            EoCoverageSelectorPage page = new EoCoverageSelectorPage(EoLayerGroupAbstractPage.this, layerGroupName, savedStore.getId());
                            setResponsePage(page);
                        };
                    };
View Full Code Here

        WorkspaceInfo ws = getCatalog().getWorkspaceByName("gs");
        // Creation of a CoverageStore
        CoverageStoreInfo store = builder.buildCoverageStore("watertemp4");
        store.setURL(DataUtilities.fileToURL(mosaic).toExternalForm());
        store.setWorkspace(ws);
        ImageMosaicFormat imageMosaicFormat = new ImageMosaicFormat();
        store.setType((imageMosaicFormat.getName()));
        // Addition to the catalog
        getCatalog().add(store);
        builder.setStore(store);
        // Input reader used for reading the mosaic folder
        GridCoverage2DReader reader = null;
        // Reader used for checking if the mosaic has been configured correctly
        StructuredGridCoverage2DReader reader2 = null;

        try {
            // Selection of the reader to use for the mosaic
            reader = (GridCoverage2DReader) imageMosaicFormat.getReader(DataUtilities
                    .fileToURL(mosaic));

            // configure the coverage
            configureCoverageInfo(builder, store, reader);
View Full Code Here

TOP

Related Classes of org.geotools.gce.imagemosaic.ImageMosaicFormat

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.