Package org.geotools.process.vector

Examples of org.geotools.process.vector.LRSSegmentProcess.execute()


        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSSegmentProcess process = new LRSSegmentProcess();
        SimpleFeatureCollection origional = source.getFeatures();

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


        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSSegmentProcess process = new LRSSegmentProcess();
        SimpleFeatureCollection origional = source.getFeatures();

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

        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSSegmentProcess process = new LRSSegmentProcess();
        SimpleFeatureCollection origional = source.getFeatures();

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

        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSSegmentProcess process = new LRSSegmentProcess();
        SimpleFeatureCollection origional = source.getFeatures();

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

        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSSegmentProcess process = new LRSSegmentProcess();
        SimpleFeatureCollection origional = source.getFeatures();

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

        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSSegmentProcess process = new LRSSegmentProcess();
        SimpleFeatureCollection origional = source.getFeatures();

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

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

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

    @Test
    public void testSegmentInOneFeature() throws Exception {
View Full Code Here

    public void testSegmentInOneFeature() throws Exception {
        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSSegmentProcess process = new LRSSegmentProcess();
        SimpleFeatureCollection origional = source.getFeatures();

        FeatureCollection result = process.execute(origional, "from_lrs", "to_lrs", 0.5, 1.5);
        Assert.assertEquals(1, result.size());
        Feature feature = result.features().next();
        MultiLineString segment = (MultiLineString) feature.getDefaultGeometryProperty().getValue();
        Assert.assertEquals(2, segment.getNumPoints());
        Assert.assertEquals(0.5, segment.getCoordinates()[0].x, 0.0);
View Full Code Here

    public void testSegmentInTwoFeature() throws Exception {
        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSSegmentProcess process = new LRSSegmentProcess();
        SimpleFeatureCollection origional = source.getFeatures();

        FeatureCollection result = process.execute(origional, "from_lrs", "to_lrs", 0.5, 3.5);
        Assert.assertEquals(1, result.size());
        Feature feature = result.features().next();
        MultiLineString segment = (MultiLineString) feature.getDefaultGeometryProperty().getValue();
        Assert.assertEquals(3, segment.getNumPoints());
        Assert.assertEquals(0.5, segment.getCoordinates()[0].x, 0.0);
View Full Code Here

    public void testSegmentInThreeFeature() throws Exception {
        SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
        LRSSegmentProcess process = new LRSSegmentProcess();
        SimpleFeatureCollection origional = source.getFeatures();

        FeatureCollection result = process.execute(origional, "from_lrs", "to_lrs", 0.5, 5.5);
        Assert.assertEquals(1, result.size());
        Feature feature = result.features().next();
        MultiLineString segment = (MultiLineString) feature.getDefaultGeometryProperty().getValue();
        Assert.assertEquals(4, segment.getNumPoints());
        Assert.assertEquals(0.5, segment.getCoordinates()[0].x, 0.0);
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.