Package org.geotools.data.memory

Examples of org.geotools.data.memory.MemoryDataStore.createSchema()


        builder.add("results_value", Float.class);
        builder.add("location", Point.class);

        SimpleFeatureType type = builder.buildFeatureType();

        dataStore.createSchema(type);

        final int NUM_STATIONS = 10;
        GeometryFactory gf = new GeometryFactory();

        SimpleFeatureBuilder fb = new SimpleFeatureBuilder(type);
View Full Code Here


    public void testEvaluate() throws Exception {

        // Create SimpleFeatures
        SimpleFeatureType type = DataUtilities.createType("polygons", "id:int,geom:Polygon");
        MemoryDataStore store = new MemoryDataStore();
        store.createSchema(type);
        String[] polygons = {
            "POLYGON ((1235702.2034807256 707935.1879023351, 1229587.156498981 671715.2942412316, 1242287.6386918353 688649.2704983709, 1245109.9680680253 677359.9529936113, 1247932.297444215 711227.9055078899, 1239935.6975450104 705583.2467555101, 1235702.2034807256 707935.1879023351))",
            "POLYGON ((1237113.3681688206 622324.5301579087, 1224883.274205331 586575.0247261701, 1258280.8384902447 589397.3541023601, 1237113.3681688206 622324.5301579087))",
            "POLYGON ((1131746.4047910655 718754.1171777296, 1115282.8167632914 681593.4470578962, 1139272.6164609052 679241.5059110713, 1147269.2163601099 707935.1879023351, 1131746.4047910655 718754.1171777296)))"
        };
View Full Code Here

        for (int i = 0; i < iVal.length; i++) {
            myfeatures[i] = SimpleFeatureBuilder.build(dataType, new Object[] { new Integer(i + 1),
                    new Integer(iVal[i]) }, "classification.test1" + (i + 1));
        }
        MemoryDataStore store = new MemoryDataStore();
        store.createSchema(dataType);
        store.addFeatures(myfeatures);
        SimpleFeatureCollection myFeatureCollection = store.getFeatureSource("test1").getFeatures();

        // run the quantile function
        org.opengis.filter.expression.Expression function = ff.function("Jenks",
View Full Code Here

        for (int i = 0; i < iVal.length; i++) {
            myfeatures[i] = SimpleFeatureBuilder.build(dataType, new Object[] { new Integer(i + 1),
                    new Integer(iVal[i]) }, "classification.t" + (i + 1));
        }
        MemoryDataStore store = new MemoryDataStore();
        store.createSchema(dataType);
        store.addFeatures(myfeatures);
        SimpleFeatureCollection myFeatureCollection = store.getFeatureSource("test1").getFeatures();

        // run the quantile function
        org.opengis.filter.expression.Expression function = ff.function("Jenks",
View Full Code Here

        for (int i = 0; i < iVal.length; i++) {
            testFeatures[i] = SimpleFeatureBuilder.build(ft, new Object[] { new Integer(i + 1),
                    iVal[i], dVal[i], }, "nantest.t" + (i + 1));
        }
        MemoryDataStore store = new MemoryDataStore();
        store.createSchema(ft);
        store.addFeatures(testFeatures);
        SimpleFeatureCollection thisFC = store.getFeatureSource("nullnan").getFeatures();

        // create the expression
        Divide divide = ff.divide(ff.property("foo"), ff.property("bar"));
View Full Code Here

    public void testEvaluate() throws Exception {

        // Create SimpleFeatures
        SimpleFeatureType type = DataUtilities.createType("polygons", "id:int,geom:Polygon");
        MemoryDataStore store = new MemoryDataStore();
        store.createSchema(type);
        String[] polygons = {
            "POLYGON ((1235702.2034807256 707935.1879023351, 1229587.156498981 671715.2942412316, 1242287.6386918353 688649.2704983709, 1245109.9680680253 677359.9529936113, 1247932.297444215 711227.9055078899, 1239935.6975450104 705583.2467555101, 1235702.2034807256 707935.1879023351))",
            "POLYGON ((1237113.3681688206 622324.5301579087, 1224883.274205331 586575.0247261701, 1258280.8384902447 589397.3541023601, 1237113.3681688206 622324.5301579087))",
            "POLYGON ((1131746.4047910655 718754.1171777296, 1115282.8167632914 681593.4470578962, 1139272.6164609052 679241.5059110713, 1147269.2163601099 707935.1879023351, 1131746.4047910655 718754.1171777296)))"
        };
View Full Code Here

                            fac.createPoint(new Coordinate(iVal[i], iVal[i])), "Group" + (i % 4) },
                    "classification.t" + (i + 1));
        }

        MemoryDataStore store = new MemoryDataStore();
        store.createSchema(dataType);
        store.addFeatures(testFeatures);
       
        featureCollection = store.getFeatureSource("test1").getFeatures();
        double[] jenks71 = { 50.12, 83.9, 76.43, 71.61, 79.66, 84.84, 87.87, 92.45, 119.9, 155.3,
                131.5, 111.8, 96.78, 86.75, 62.41, 96.37, 75.51, 77.29, 85.41, 116.4, 58.5, 75.29,
View Full Code Here

        for(int i=0;i<jenks71.length;i++) {
           
            features[i] = SimpleFeatureBuilder.build(jenksType, new Object[] { new Integer(i + 1), new Double(jenks71[i])},"jenks"+i);
        }
        MemoryDataStore jenks = new MemoryDataStore();
        jenks.createSchema(jenksType);
        jenks.addFeatures(features);
        jenksCollection = jenks.getFeatureSource("jenks71").getFeatures();
       
    }
View Full Code Here

    public void testEvaluate() throws Exception {

        // Create SimpleFeatures
        SimpleFeatureType type = DataUtilities.createType("polygons", "id:int,geom:Polygon");
        MemoryDataStore store = new MemoryDataStore();
        store.createSchema(type);
        String[] polygons = {
            "POLYGON ((1235702.2034807256 707935.1879023351, 1229587.156498981 671715.2942412316, 1242287.6386918353 688649.2704983709, 1245109.9680680253 677359.9529936113, 1247932.297444215 711227.9055078899, 1239935.6975450104 705583.2467555101, 1235702.2034807256 707935.1879023351))",
            "POLYGON ((1237113.3681688206 622324.5301579087, 1224883.274205331 586575.0247261701, 1258280.8384902447 589397.3541023601, 1237113.3681688206 622324.5301579087))",
            "POLYGON ((1131746.4047910655 718754.1171777296, 1115282.8167632914 681593.4470578962, 1139272.6164609052 679241.5059110713, 1147269.2163601099 707935.1879023351, 1131746.4047910655 718754.1171777296)))"
        };
View Full Code Here

      myfeatures[i] = SimpleFeatureBuilder.build(dataType, new Object[] {
          new Integer(i + 1), new Integer(iVal[i]) },
          "classification.test1" + (i + 1));
    }
    MemoryDataStore store = new MemoryDataStore();
    store.createSchema(dataType);
    store.addFeatures(myfeatures);
    SimpleFeatureCollection myFeatureCollection = store.getFeatureSource("test1").getFeatures();

    //run the quantile function
    org.opengis.filter.expression.Expression function = ff.function("Quantile", ff.property("value"), ff.literal(5));
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.