Examples of FeatureWriter


Examples of org.geotools.data.FeatureWriter

   
    void loadLines(DataStore dataStore) throws Exception {
        SimpleFeatureType Lines = buildFeatureType( "Lines", cgf, 32615,
                Arrays.asList( "id", "lineStringProperty"), String.class, LineString.class );
           
        FeatureWriter w = buildFeatureStore(Lines, dataStore);
        feature(w, "t0001", geometry("LINESTRING(500125 500025,500175 500075)", 32615 ));
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

   
    void loadMLines(DataStore dataStore) throws Exception {
        SimpleFeatureType MLines = buildFeatureType( "MLines", cgf,  32615,
                Arrays.asList( "id", "multiLineStringProperty"), String.class, MultiLineString.class );
       
        FeatureWriter w = buildFeatureStore(MLines, dataStore);
        feature(w, "t0004", geometry("MULTILINESTRING((500425 500025,500475 500075),(500425 500075,500475 500025))",32615));
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

   
    void loadMPoints(DataStore dataStore) throws Exception {
        SimpleFeatureType MPoints = buildFeatureType( "MPoints", cgf, 32615,
                Arrays.asList( "id", "multiPointProperty"), String.class, MultiPoint.class );
       
        FeatureWriter w = buildFeatureStore( MPoints, dataStore );
        feature( w, "t0003", geometry("MULTIPOINT(500325 500025,500375 500075)",32615));
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

   
    void loadMPolygons(DataStore dataStore) throws Exception {
        SimpleFeatureType MPolygons = buildFeatureType( "MPolygons", cgf,  32615,
                Arrays.asList( "id", "multiPolygonProperty"), String.class, MultiPolygon.class );
           
        FeatureWriter w = buildFeatureStore( MPolygons, dataStore );
        feature( w, "t0005", geometry("MULTIPOLYGON(((500525 500025,500550 500050,500575 500025," +
            "500525 500025)),((500525 500050,500525 500075,500550 500075,500550 500050,500525 500050)))",32615));
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

       
    void loadPoints(DataStore dataStore) throws Exception {
        SimpleFeatureType Points = buildFeatureType( "Points", cgf, 32615,
            Arrays.asList( "id", "pointProperty"), String.class, Point.class );   
   
        FeatureWriter w = buildFeatureStore(Points,dataStore);
        feature( w, "t0000", geometry("POINT(500050 500050)",32615));
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

   
    void loadPolygons(DataStore dataStore) throws Exception {
        SimpleFeatureType Polygons = buildFeatureType( "Polygons", cgf, 32615,
                Arrays.asList( "id", "polygonProperty"), String.class, Polygon.class );
   
        FeatureWriter w = buildFeatureStore(Polygons,dataStore);
        feature( w, "t0002", geometry("POLYGON((500225 500025,500225 500075,500275 500050,500275 500025,500225 500025))",32615));
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

                "intProperty", "uriProperty", "measurand", "dateTimeProperty", "dateProperty", "decimalProperty"),
            Arrays.asList( "intProperty", "measurand", "decimalProperty" ),
            String.class, String.class, Polygon.class, Point.class, LineString.class, Integer.class,
            String.class, Double.class, Date.class, Date.class, Double.class );   
       
        FeatureWriter w = buildFeatureStore(PrimitiveGeoFeature,dataStore);
        feature( w, "description-f001", "name-f001", null, geometry("POINT(2.00342 39.73245)", 4326),
            null, 155, "http://www.opengeospatial.org/", 12765.0, null, date( "2006-10-25" ), 5.03 );
        feature( w, "description-f002", "name-f002", null, geometry("POINT(0.22601 59.41276)", 4326),
                null, 154, "http://www.opengeospatial.org/", 12769.0, null, date( "2006-10-23" ), 4.02 );
        feature( w, "description-f003", "name-f003", null, null, geometry("LINESTRING(9.799 46.074,10.466 46.652,11.021 47.114)", 4326),
                180, null, 672.1, null, date( "2006-09-01" ), 12.92 );
        feature( w, "description-f008", "name-f008", geometry("POLYGON((30.899 45.174,30.466 45.652,30.466 45.891,30.899 45.174))", 4326),null,
                null, 300, null, 783.5, datetime("2006-06-28 07:08:00 +0200"), date( "2006-12-12" ), 18.92 );
        feature( w, null, "name-f015", null, geometry("POINT(-10.52 34.94)", 4326),
                null, -900, null, 2.4, null, null, 7.9 );
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

                    "multiSurfaceProperty", "doubleProperty", "intRangeProperty", "strProperty", "featureCode"),
                Arrays.asList( "doubleProperty", "strProperty", "featureCode" ),
                String.class, String.class, MultiPoint.class, MultiLineString.class, MultiPolygon.class,
                Double.class, String.class, String.class, String.class );   
       
        FeatureWriter w = buildFeatureStore(AggregateGeoFeature,dataStore);
        feature( w, "description-f005","name-f005", geometry("MULTIPOINT(29.86 70.83,31.08 68.87,32.19 71.96)",4326),
            null,null,2012.78,null,"Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e " +
            "regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li " +
            "existent Europan lingues.","BK030");
        feature( w, "description-f009","name-f009",null, geometry("MULTILINESTRING((-5.899 55.174," +
            "-5.466 55.652,-5.899 55.891,-5.899 58.174,-5.466 58.652,-5.899 58.891),(-5.188 53.265," +
            "-4.775 54.354,-4.288 52.702,-4.107 53.611,-4.010 55.823))",4326),null,20.01,null,
            "Ma quande lingues coalesce, li grammatica del resultant.","GB007");
        feature( w, "description-f010","name-f010",null,null,geometry("MULTIPOLYGON(((20 50,19 54,20 55," +
            "30 60,28 52,27 51,29 49,27 47,20 50),(25 55,25.2 56,25.1 56,25 55)),((20.0 35.5,24.0 35.0," +
            "28.0 35.0,27.5 39.0,22.0 37.0,20.0 35.5),(26.0 36.0,25.0 37.0,27.0 36.8,26.0 36.0)))",4326),
            24510,null,"Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e " +
            "regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari " +
            "quam li existent Europan lingues.","AK020");
        feature( w, null,"name-f016",null,null,geometry("MULTIPOLYGON(((6.0 57.5, 8.0 57.5, 8.0 60.0, 9.0 62.5, 5.0 62.5,6.0 60.0,6.0 57.5)," +
            "(6.5 58.0,6.5 59.0,7.0 59.0,6.5 58.0)))",4326),-182.9,null,"In rhoncus nisl sit amet sem.","EE010");
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

    //void loadEntit�G�n�rique(DataStore dataStore) throws Exception {
        SimpleFeatureType /*Entit�G�n�rique*/EntiteGenerique = buildFeatureType( "Entit�G�n�rique", sf, 4326,
            Arrays.asList( "description", "name", "attribut.G�om�trie", "boolProperty", "str4Property", "featureRef"),
            Arrays.asList( "attribut.G�om�trie", "boolProperty", "str4Property"),
            String.class, String.class, Geometry.class, Boolean.class, String.class, String.class );
        FeatureWriter w = buildFeatureStore(EntiteGenerique, dataStore);
        feature( w, "description-f004","name-f004", geometry("POLYGON((0 60.5,0 64,6.25 64,6.25 60.5,0 60.5)," +
            "(2 61.5,2 62.5,4 62,2 61.5))",4326),true,"abc3","name-f003");
        feature( w, "description-f007","name-f007", geometry("POLYGON((15 35,16 40,20 39,22.5 37,18 36,15 35)," +
            "(17.5 37.1,17.6 37.2,17.7 37.3,17.8 37.4,17.9 37.5,17.9 37,17.5 37.1))",4326),false,"def4",null);
        feature( w, "description-f017", "name-f017",geometry("LINESTRING(4.899 50.174,5.466 52.652,6.899 53.891," +
            "7.780 54.382,8.879 54.982)",4326),false,"qrst","name-f015");
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

                ShapefileDataStore ds = new ShapefileDataStore(file.toURL());
                tb.init(proto);
                tb.setName(name);
                ds.createSchema(tb.buildFeatureType());
               
                FeatureWriter fw = ds.getFeatureWriterAppend(name, Transaction.AUTO_COMMIT);
                for (int j = 0; j < m; j++) {
                    fw.hasNext();
                    SimpleFeature f = (SimpleFeature)fw.next();
                    f.setDefaultGeometry(gfac.createPoint(new Coordinate(nextFloat(ran, -180, 180),
                        nextFloat(ran, -90, 90))));
                    f.setAttribute("index", j);
                    fw.write();
                }
                fw.close();
               
                zip(dir, name);
            }
        }
    }
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.