Package org.geotools.data

Examples of org.geotools.data.DataStore.createSchema()


                    return;
                }

                try {
                    SimpleFeatureType featureType = buildFeatureType();
                    ds.createSchema(featureType);

                    CatalogBuilder builder = new CatalogBuilder(getCatalog());
                    builder.setStore(dsInfo);
                    FeatureTypeInfo fti = builder.buildFeatureType(getFeatureSource(ds));
                    LayerInfo layerInfo = builder.buildLayer(fti);
View Full Code Here


            tb.setName(name);
            sourceType = tb.buildFeatureType();
        }

        // create the schema
        ds.createSchema(sourceType);

        // try to get the target feature type (might have slightly different
        // name and structure)
        targetType = ds.getSchema(sourceType.getTypeName());
        if (targetType == null) {
View Full Code Here

        DataStore dstore = null;
        File file = null;
        try {
            file = new File(tempDir, schema.getTypeName() + ".shp");
            dstore = new ShapefileDataStore(file.toURL());
            dstore.createSchema(schema);
           
            fstore = (SimpleFeatureStore) dstore.getFeatureSource(schema.getTypeName());
            fstore.addFeatures(collection);
        } catch (IOException ioe) {
            LOGGER.log(Level.WARNING,
View Full Code Here

        tb.remove("surfaceProperty"); // the store cannot create multi-geom tables it seems
        tb.remove("curveProperty"); // the store cannot create multi-geom tables it seems
        tb.remove("uriProperty"); // this would render the store read only
        tb.setName("pgeo");
        SimpleFeatureType schema = tb.buildFeatureType();
        store.createSchema(schema);
        SimpleFeatureStore featureStore = (SimpleFeatureStore) store.getFeatureSource("pgeo");
        featureStore.addFeatures(fsp.getFeatures());

        CatalogBuilder cb = new CatalogBuilder(cat);
        cb.setStore(ds);
View Full Code Here

        DataStore store = (DataStore) ds.getDataStore(null);
        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
       
        tb.init((SimpleFeatureType) fs1.getSchema());
        tb.remove("boundedBy");
        store.createSchema(tb.buildFeatureType());
       
        tb.init((SimpleFeatureType) fs2.getSchema());
        tb.remove("boundedBy");
        store.createSchema(tb.buildFeatureType());
       
View Full Code Here

        tb.remove("boundedBy");
        store.createSchema(tb.buildFeatureType());
       
        tb.init((SimpleFeatureType) fs2.getSchema());
        tb.remove("boundedBy");
        store.createSchema(tb.buildFeatureType());
       
        CatalogBuilder cb = new CatalogBuilder(cat);
        cb.setStore(ds);
       
        FeatureStore fs = (FeatureStore) store.getFeatureSource("Fifteen");
View Full Code Here

        tb.setName("widgets");
        tb.add("type", String.class);
        tb.add("price", Double.class);
        tb.add("geom", Point.class);
        SimpleFeatureType ft = tb.buildFeatureType();
        ds.createSchema(ft);
       
        FeatureWriter fw = ds.getFeatureWriter("widgets", Transaction.AUTO_COMMIT);
       
        WKTReader wkt = new WKTReader();
       
View Full Code Here

        tb.setName("widgets");
        tb.add("type", String.class);
        tb.add("price", Double.class);
        tb.add("geom", Point.class);
        SimpleFeatureType ft = tb.buildFeatureType();
        ds.createSchema(ft);
       
        FeatureWriter fw = ds.getFeatureWriter("widgets", Transaction.AUTO_COMMIT);
       
        WKTReader wkt = new WKTReader();
       
View Full Code Here

            for (FeatureCollection fc : featureCollection.getFeatures()) {

                SimpleFeatureType featureType = (SimpleFeatureType) fc.getSchema()
                        ;
                //create a feature type
                dataStore.createSchema(featureType);

                FeatureWriter fw = dataStore.getFeatureWriterAppend(
                    featureType.getTypeName(), Transaction.AUTO_COMMIT);

                //Start populating the table: tbl_name.
View Full Code Here

        SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
       
        tb.init((SimpleFeatureType) fs1.getSchema());
        tb.add("num", Integer.class);
        tb.remove("boundedBy");
        store.createSchema(tb.buildFeatureType());
       
        tb.init((SimpleFeatureType) fs2.getSchema());
        tb.add("num", Integer.class);
        tb.remove("boundedBy");
        store.createSchema(tb.buildFeatureType());
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.