Examples of FeatureWriter


Examples of org.geotools.data.FeatureWriter

        tb.add( "g", Point.class );
        tb.add( "name", String.class );
       
        ds.createSchema( tb.buildFeatureType() );
       
        FeatureWriter fw = ds.getFeatureWriterAppend( "widgets", Transaction.AUTO_COMMIT );
        fw.hasNext();
        SimpleFeature sf = (SimpleFeature) fw.next();
        sf.setAttribute("g", new GeometryFactory().createPoint( new Coordinate(1,1)));
        sf.setAttribute( "name", "one");
        fw.write();
       
        fw.hasNext();
        sf = (SimpleFeature) fw.next();
        sf.setAttribute("g", new GeometryFactory().createPoint( new Coordinate(2,2)));
        sf.setAttribute( "name", "two");
        fw.write();
       
        fw.close();
        ds.dispose();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

        tb.setName( "widgetsNG" );
        tb.add( "name", String.class );
       
        ds.createSchema( tb.buildFeatureType() );
       
        FeatureWriter fw = ds.getFeatureWriterAppend( "widgetsNG", Transaction.AUTO_COMMIT );
        fw.hasNext();
        SimpleFeature sf = (SimpleFeature) fw.next();
        sf.setAttribute( "name", "one");
        fw.write();
       
        fw.hasNext();
        sf = (SimpleFeature) fw.next();
        sf.setAttribute( "name", "two");
        fw.write();
       
        fw.close();
       
        String xml =
            "<featureType>" +
              "<name>widgetsNG</name>" +
            "</featureType>";
View Full Code Here

Examples of org.geotools.data.FeatureWriter

   
    void loadDeletes(DataStore dataStore) throws Exception {
        SimpleFeatureType Deletes = buildFeatureType( "Deletes", cdf, 32615,
                Arrays.asList( "id", "pointProperty"),  String.class, Point.class );   

        FeatureWriter w = buildFeatureStore( Deletes, dataStore );
        feature( w, "td0001", geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, "td0002", geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, "td0003", geometry( "POINT(500050 500050)" , 32615 ) );
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

   
    void loadFifteen(DataStore dataStore) throws Exception {
        SimpleFeatureType Fifteen = buildFeatureType( "Fifteen", cdf, 32615,
                Arrays.asList( "pointProperty" ), Point.class );
       
        FeatureWriter w = buildFeatureStore( Fifteen, dataStore );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

   
    void loadInserts(DataStore dataStore) throws Exception {
        SimpleFeatureType Inserts = buildFeatureType( "Inserts", cdf, 32615,
                Arrays.asList( "id", "pointProperty"),  String.class, Point.class );
       
        FeatureWriter w = buildFeatureStore( Inserts, dataStore );
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

    void loadLocks(DataStore dataStore) throws Exception {
       
        SimpleFeatureType Locks = buildFeatureType( "Locks", cdf, 32615,
            Arrays.asList( "id", "pointProperty"),  String.class, Point.class );
       
        FeatureWriter w = buildFeatureStore(Locks, dataStore);
        feature( w, "lfla0001", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfla0002", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfla0003", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfla0004", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlla0001", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlla0002", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlla0003", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlla0004", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfbt0001", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfbt0002", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfbt0003", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfbt0004", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfbt0005", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfbt0006", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlbt0001", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlbt0002", geometry("POINT(500050 500050)", 32615 ) );
        feature( w,  "gfwlbt0003", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlbt0004", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlbt0005", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlbt0006", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfe0001", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfe0002",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfe0003",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfe0004",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwle0001",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwle0002",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwle0003",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwle0004",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfra0001",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfra0002",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfra0003",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfra0004",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfra0005",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfra0006",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfra0007",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfra0008",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfra0009",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfra0010",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlra0001",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlra0002",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlra0003",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlra0004",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlra0005",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlra0006",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlra0007",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlra0008",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlra0009",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlra0010",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfrs0001",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfrs0002",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfrs0003",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfrs0004",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfrs0005",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfrs0006",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfrs0007",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfrs0008",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfrs0009",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "lfrs0010",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlrs0001",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlrs0002",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlrs0003",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlrs0004",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlrs0005",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlrs0006",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlrs0007",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlrs0008",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlrs0009",geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "gfwlrs0010",geometry("POINT(500050 500050)", 32615 ) );
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

    void loadNulls(DataStore dataStore) throws Exception {
        SimpleFeatureType Nulls = buildFeatureType( "Nulls", cdf,  32615,
                Arrays.asList( "description", "name", "integers", "dates", "pointProperty"),
                String.class, String.class, Integer.class, Date.class, Point.class );
       
        FeatureWriter w = buildFeatureStore(Nulls, dataStore);
        feature( w, "nullFeature",null,null,null,null );
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

        SimpleFeatureType Other = buildFeatureType( "Other", cdf, 32615,
                Arrays.asList( "description", "name", "pointProperty", "string1", "string2", "integers", "dates"),
                Arrays.asList( "string1" ),
                String.class, String.class, Point.class, String.class, String.class, Integer.class, Date.class );   
   
        FeatureWriter w = buildFeatureStore( Other, dataStore );
       
        feature( w, "A Single Feature used to test returning of properties", "singleFeature",
                geometry("POINT(500050 500050)",32615 ), "always", "sometimes",7, date( "2002-12-02" ) );

    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

   
    void loadSeven(DataStore dataStore) throws Exception {
        SimpleFeatureType Seven = buildFeatureType( "Seven", cdf, 32615,
                Arrays.asList( "pointProperty"), Point.class );
       
        FeatureWriter w = buildFeatureStore(Seven, dataStore);
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        feature( w, geometry( "POINT(500050 500050)" , 32615 ) );
        w.close();
    }
View Full Code Here

Examples of org.geotools.data.FeatureWriter

   
    void loadUpdates(DataStore dataStore) throws Exception {
        SimpleFeatureType Updates = buildFeatureType( "Updates", cdf, 32615,
                Arrays.asList( "id", "pointProperty"), String.class, Point.class );
       
        FeatureWriter w = buildFeatureStore( Updates, dataStore );
        feature( w, "tu0001", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "tu0002", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "tu0003", geometry("POINT(500050 500050)", 32615 ) );
        feature( w, "tu0004", geometry("POINT(500050 500050)", 32615 ) );
        w.close();
    }
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.