Package org.geotools.data.memory

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


    builder.add(makePoint("POINT (1 2)"));
    SimpleFeature f2 = builder.buildFeature("fid-0002");

        MemoryDataStore data = new MemoryDataStore();
       
        data.createSchema(m_samples.getFlagType());
       
        data.addFeature(f1);
        data.addFeature(f2);
        FeatureSource<SimpleFeatureType, SimpleFeature> fs = data.getFeatureSource(m_samples.getFlagType().getName());
       
View Full Code Here


    return m_samples.buildSimpleFeature(fid, classification);
  }

  private FeatureCollectionType make(Feature... features) throws IOException {
        MemoryDataStore data = new MemoryDataStore();
        data.createSchema(m_samples.getFlagType());

        for (Feature f : features) {
          data.addFeature((SimpleFeature) f);
        }
        FeatureSource<SimpleFeatureType, SimpleFeature> fs = data.getFeatureSource(m_samples.getFlagType().getName());
View Full Code Here

public class Features {
  private static final Samples SAMPLES = new Samples();

  public static FeatureCollectionType make(Feature... features) throws IOException {
        MemoryDataStore data = new MemoryDataStore();
        data.createSchema(SAMPLES.getFlagType());

        for (Feature f : features) {
          data.addFeature((SimpleFeature) f);
        }
        FeatureSource<SimpleFeatureType, SimpleFeature> fs = data.getFeatureSource(SAMPLES.getFlagType().getName());
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

    Feature f1 = type.create(new Object[]{point});
    Feature f2 = type.create(new Object[]{line});
    Feature f3 = type.create(new Object[]{polygon});
   
    MemoryDataStore ds = new MemoryDataStore();
    ds.createSchema(type);
    ds.addFeatures(new Feature[]{f1,f2,f3});
   
    FeatureSource fs = ds.getFeatureSource("test");
   
    final WMSMapContext map = new WMSMapContext();
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.