Package org.geotools.data.memory

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


        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("Quantile", ff.property("value"), ff.literal(5));
View Full Code Here


            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

        buildType.addAll(newTypes);
       
        final SimpleFeatureType schema = buildType.buildFeatureType();
        // Configure memory datastore
        final MemoryDataStore memory = new MemoryDataStore();
        memory.createSchema(schema);
       
        collection.accepts(new FeatureVisitor() {
            public void visit(Feature feature) {
                SimpleFeatureBuilder builder = new SimpleFeatureBuilder(schema);
               
View Full Code Here

            } else {
                numdata = 100;
            }

            dataset = DataUtilities.createUnitsquareDataSet(numdata, 1025);
            ds.createSchema((SimpleFeatureType)dataset.getSchema());
            ds.addFeatures(dataset);

            if (hardest) {
              Properties pset = new Properties();
                pset.setProperty(BufferedDiskStorage.BUFFER_SIZE_PROPERTY, "10");
View Full Code Here

        tb.add("level", Integer.class);

        SimpleFeatureType type = tb.buildFeatureType();
        MemoryDataStore ds = new MemoryDataStore();

        ds.createSchema(type);

        FeatureWriter<SimpleFeatureType, SimpleFeature> writer;
        writer = ds.getFeatureWriterAppend("latlon", Transaction.AUTO_COMMIT);

        for (int lon = -180; lon < 180; lon += 5) {
View Full Code Here

        SimpleFeature f1 = SimpleFeatureBuilder.build(type, new Object[] { point }, null);
        SimpleFeature f2 = SimpleFeatureBuilder.build(type, new Object[] { line }, null);
        SimpleFeature f3 = SimpleFeatureBuilder.build(type, new Object[] { polygon }, null);

        MemoryDataStore ds = new MemoryDataStore();
        ds.createSchema(type);
        ds.addFeatures(new SimpleFeature[] { f1, f2, f3 });

        FeatureSource fs = ds.getFeatureSource("test");

        final WMSMapContext map = new WMSMapContext();
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);
        pointCollection = store.getFeatureSource("test1").getFeatures();


View Full Code Here

            features[i] = SimpleFeatureBuilder.build(jenksType, new Object[] { new Integer(i + 1), new Double(jenks71[i]),
                    fac.createLineString(new Coordinate[]{new Coordinate(jenks71[i], jenks71[i]),
                    new Coordinate(jenks71[i]-1.0, jenks71[i]+1.0)})},"jenks"+i);
        }
        MemoryDataStore jenks = new MemoryDataStore();
        jenks.createSchema(jenksType);
        jenks.addFeatures(features);
        lineCollection = jenks.getFeatureSource("jenks71").getFeatures();

    }
View Full Code Here

        SimpleFeature f1 = SimpleFeatureBuilder.build(type, new Object[] { point }, null);
        SimpleFeature f2 = SimpleFeatureBuilder.build(type, new Object[] { line }, null);
        SimpleFeature f3 = SimpleFeatureBuilder.build(type, new Object[] { polygon }, null);

        MemoryDataStore ds = new MemoryDataStore();
        ds.createSchema(type);
        ds.addFeatures(new SimpleFeature[] { f1, f2, f3 });

        FeatureSource fs = ds.getFeatureSource("test");

        final WMSMapContent map = new WMSMapContent();
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.