Package org.geotools.data.georest

Examples of org.geotools.data.georest.GeoRestFeatureSource


    }

    public void testGetFeatureSource() throws IOException {
        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        DataStore ds = factory.createDataStore(createParams());
        GeoRestFeatureSource source = (GeoRestFeatureSource) ds.getFeatureSource(FEATURESOURCE);
        Assert.assertNotNull(source);
    }
View Full Code Here


    }

    public void testGetSchema() throws IOException {
        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        DataStore ds = factory.createDataStore(createParams());
        GeoRestFeatureSource source = (GeoRestFeatureSource) ds.getFeatureSource(FEATURESOURCE);
        SimpleFeatureType type = source.getSchema();
        Assert.assertNotNull(type);
        Assert.assertTrue(type.getAttributeCount() > 0);
    }
View Full Code Here

    }

    public void testCountFeatures() throws IOException {
        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        DataStore ds = factory.createDataStore(createParams());
        GeoRestFeatureSource source = (GeoRestFeatureSource) ds.getFeatureSource(FEATURESOURCE);
        int count = source.getCount(new Query(FEATURESOURCE, Filter.INCLUDE));
        Assert.assertTrue(count > 0);
        BBOX bbox = FF.bbox("geometry", 0, 0, 10, 10, "EPSG:4326");
        count = source.getCount(new Query(FEATURESOURCE, bbox, 5, new String[] {}, ""));
        Assert.assertTrue(count == 5);
    }
View Full Code Here

TOP

Related Classes of org.geotools.data.georest.GeoRestFeatureSource

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.