Package org.geotools.process

Examples of org.geotools.process.Process.execute()


        //execute the process
        Map<String,Object> result = null;
        Throwable error = null;
        try {
            Process p = pf.create(processName);
            result = p.execute( inputs, null );   
        }
        catch( Throwable t ) {
            //save the error to report back
            error = t;
        }
View Full Code Here


    }
   
    @Test
    public void testDefaultValues() throws Exception {
        Process defaults = factory.create(new NameImpl("bean", "Defaults"));
        Map<String, Object> results = defaults.execute(Collections.EMPTY_MAP, null);
       
        // double check all defaults have been applied
        assertEquals("default string", results.get("string"));
        assertEquals(new WKTReader().read("POINT(0 0)"), results.get("geometry"));
        assertEquals(1, results.get("int"));
View Full Code Here

        map.put("attribute", "value");
        map.put("rasterWidth", gridDim.width);
        map.put("rasterHeight", gridDim.height);
        map.put("bounds", bounds);

        Map<String, Object> result = p.execute(map, monitor);
        GridCoverage2D cov = (GridCoverage2D) result.get("result");
       
        //textPrintFloat(cov);
       
        /*
 
View Full Code Here

        map.put("attribute", "value");
        map.put("rasterWidth", gridDim.width);
        map.put("rasterHeight", gridDim.height);
        map.put("bounds", bounds);

        Map<String, Object> result = p.execute(map, monitor);
        GridCoverage2D cov = (GridCoverage2D) result.get("result");
       
        //textPrint(cov);
       
        /*
 
View Full Code Here

       
        NameImpl name = new NameImpl("vec","Aggregate");
        Process process = Processors.createProcess( name );
        assertNotNull("aggregateProcess not found", process);
        NullProgressListener monitor = new NullProgressListener();
        Map<String, Object> output = process.execute(input, monitor );
       
        Results result = (Results) output.get("result");
        assertTrue( result.sum > 0 );
    }
   
View Full Code Here

        page.setLayout(new GridLayout(0, 2));

        Process process = this.factory.create(name);

        final ProgressListener progress = new JProgressWindow(this.getJWizard());
        Map<String, Object> resultMap = process.execute(paramMap, progress);

        // when we get here, the processing is over so show the result
        JLabel title = new JLabel(factory.getTitle().toString());
        page.add(title);
        JLabel description = new JLabel("Your process results are below:");
View Full Code Here

        assertNotNull(process);
       
        Map<String, Object> inputs = new HashMap<String, Object>();
        inputs.put("data", buildSmallCoverage());
        inputs.put("ranges", Arrays.asList(new Range<Integer>(0, true, 1, true), new Range<Integer>(2, true, 3, true)));
        Map<String, Object> results = process.execute(inputs, null);
        Object result = results.get("result");
        assertTrue(result instanceof SimpleFeatureCollection);
        SimpleFeatureCollection fc = (SimpleFeatureCollection) result;
        assertEquals(4, fc.size());
    }
View Full Code Here

        Map<String, Object> map = new TreeMap<String, Object>();
        map.put("buffer", 350);
        map.put("geom1", geom1);

        // execute/send-request for the process
        Map<String, Object> results = process.execute(map, null);

        // check that the result is expected
        assertNotNull(results);

        Geometry expected = geom1.buffer(350);
View Full Code Here

        list.add(geom3);
        list.add(geom4);
        map.put("geom", list);

        // execute/send-request for the process
        Map<String, Object> results = process.execute(map, null);

        // check that the result is expected
        assertNotNull(results);

        // Geometry expected = geom1.union(geom2);
View Full Code Here

        // setup the inputs as empty (which should return an exception)
        Map<String, Object> map = new TreeMap<String, Object>();

        // execute/send-request for the process
        Map<String, Object> results = process.execute(map, null);

        // check that the result is expected (null)
        assertNull(results);

    }
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.