Package org.geotools.process.vector

Examples of org.geotools.process.vector.LRSGeocodeProcess


    }

    @Test
    public void testBadParamFromLrs() throws Exception {
        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSGeocodeProcess process = new LRSGeocodeProcess();
        SimpleFeatureCollection origional = source.getFeatures();

        try {
            FeatureCollection result = process.execute(origional, "from_lrs_bad", "to_lrs", 1.0);
            Assert.fail("Expected error from bad from_lrs name");
        } catch (ProcessException e) {
            // Successful
        }
    }
View Full Code Here


    }

    @Test
    public void testBadParamToLrs() throws Exception {
        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSGeocodeProcess process = new LRSGeocodeProcess();
        SimpleFeatureCollection origional = source.getFeatures();

        try {
            FeatureCollection result = process.execute(origional, "from_lrs", "to_lrs_bad", 1.0);
            Assert.fail("Expected error from bad to_lrs name");
        } catch (ProcessException e) {
            // Successful
        }
    }
View Full Code Here

    }

    @Test
    public void testnullParamFromLrs() throws Exception {
        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSGeocodeProcess process = new LRSGeocodeProcess();
        SimpleFeatureCollection origional = source.getFeatures();

        try {
            FeatureCollection result = process.execute(origional, null, "to_lrs", 1.0);
            Assert.fail("Expected error from bad from_lrs name");
        } catch (ProcessException e) {
            // Successful
        }
    }
View Full Code Here

    }

    @Test
    public void testNullParamToLrs() throws Exception {
        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSGeocodeProcess process = new LRSGeocodeProcess();
        SimpleFeatureCollection origional = source.getFeatures();

        try {
            FeatureCollection result = process.execute(origional, "from_lrs", null, 1.0);
            Assert.fail("Expected error from bad to_lrs name");
        } catch (ProcessException e) {
            // Successful
        }
    }
View Full Code Here

    }

    @Test
    public void testBadMeasure() throws Exception {
        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSGeocodeProcess process = new LRSGeocodeProcess();
        SimpleFeatureCollection origional = source.getFeatures();

        try {
            FeatureCollection result = process.execute(origional, "from_lrs", "to_lrs_bad", null);
            Assert.fail("Expected error from bad measure value");
        } catch (ProcessException e) {
            // Successful
        }
    }
View Full Code Here

        }
    }

    @Test
    public void testNoFeaturesGiven() throws Exception {
        LRSGeocodeProcess process = new LRSGeocodeProcess();
        FeatureCollection origional = FeatureCollections.newCollection();

        FeatureCollection result = process.execute(origional, "from_lrs", "to_lrs", 1.0);
        Assert.assertEquals(0, result.size());
    }
View Full Code Here

    }

    @Test
    public void testGoodGeocode() throws Exception {
        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSGeocodeProcess process = new LRSGeocodeProcess();
        SimpleFeatureCollection origional = source.getFeatures();

        FeatureCollection result = process.execute(origional, "from_lrs", "to_lrs", 1.0);
        Assert.assertEquals(1, result.size());
        Feature feature = result.features().next();
        Point point = (Point) feature.getDefaultGeometryProperty().getValue();
        Assert.assertEquals(1.0, point.getX(), 0.0);
        Assert.assertEquals(0.0, point.getY(), 0.0);
View Full Code Here

TOP

Related Classes of org.geotools.process.vector.LRSGeocodeProcess

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.