Examples of PropertyDataStore


Examples of org.geotools.data.property.PropertyDataStore

    public void setUp() throws Exception {
        // check if we can run the tests
        Assume.assumeTrue(Ogr2OgrTestUtil.isOgrAvailable());
       
        // the data source we'll use for the tests
        dataStore = new PropertyDataStore(new File("./src/test/java/org/geoserver/wfs/response"));

        // the output format (and let's add a few output formats to play with
        ogr = new Ogr2OgrOutputFormat(new GeoServerImpl());
        ogr.addFormat(new OgrFormat("KML", "OGR-KML", ".kml", true, "application/vnd.google-earth.kml"));
        ogr.addFormat(new OgrFormat("KML", "OGR-KML-ZIP", ".kml", false, "application/vnd.google-earth.kml"));
View Full Code Here

Examples of org.geotools.data.property.PropertyDataStore

        final String fileName = MockData.BUILDINGS.getLocalPart() + ".properties";
        URL properties = MockData.class.getResource(fileName);
        IOUtils.copy(properties.openStream(), new File(data, fileName));

        PropertyDataStore pds = new PropertyDataStore(data);
        rts = new RetypingDataStore(pds) {
            @Override
            protected String transformFeatureTypeName(String originalName) {
                if (originalName.equals(MockData.BUILDINGS.getLocalPart()))
                    return RENAMED;
View Full Code Here

Examples of org.geotools.data.property.PropertyDataStore

        ftb.add("dateTimeProperty", Date.class); // timestamp -> date
        ftb.add("newProperty", String.class); // new property
        ftb.setName(RENAMED); // rename type
        primitive = ftb.buildFeatureType();
       
        PropertyDataStore pds = new PropertyDataStore(data);
        rts = new RetypingDataStore(pds) {
         
          @Override
          protected SimpleFeatureType transformFeatureType(
              SimpleFeatureType original) throws IOException {
View Full Code Here

Examples of org.geotools.data.property.PropertyDataStore

        data.mkdir();

        copyTestData(BUILDINGS, data);
        copyTestData(BRIDGES, data);

        store = new PropertyDataStore(data);
    }
View Full Code Here

Examples of org.geotools.data.property.PropertyDataStore

       
        try {
            expect(ds.getDataStore(null)).andAnswer((IAnswer)new IAnswer<DataAccess>() {
                @Override
                public DataAccess answer() throws Throwable {
                    return new PropertyDataStore(propDir, ns.getURI());
                }
            }).anyTimes();
        } catch (IOException e) {
        }
   
View Full Code Here

Examples of org.geotools.data.property.PropertyDataStore

        ftb.add("dateTimeProperty", Date.class); // timestamp -> date
        ftb.add("newProperty", String.class); // new property
        ftb.setName(RENAMED); // rename type
        primitive = ftb.buildFeatureType();
       
        PropertyDataStore pds = new PropertyDataStore(data);
        rts = new RetypingDataStore(pds) {
         
          @Override
          protected SimpleFeatureType transformFeatureType(
              SimpleFeatureType original) throws IOException {
View Full Code Here

Examples of org.geotools.data.property.PropertyDataStore

    }

    @Override
    protected void setUp() throws Exception {
        // the data source we'll use for the tests
        dataStore = new PropertyDataStore(new File("./src/test/java/org/geoserver/wfs/response"));

        // the output format (and let's add a few output formats to play with
        ogr = new Ogr2OgrOutputFormat(new GeoServerImpl());
        ogr.addFormat(new OgrFormat("KML", "OGR-KML", ".kml", true, "application/vnd.google-earth.kml"));
        ogr.addFormat(new OgrFormat("KML", "OGR-KML-ZIP", ".kml", false, "application/vnd.google-earth.kml"));
View Full Code Here

Examples of org.geotools.data.property.PropertyDataStore

        final String fileName = MockData.BUILDINGS.getLocalPart() + ".properties";
        URL properties = MockData.class.getResource(fileName);
        IOUtils.copy(properties.openStream(), new File(data, fileName));

        PropertyDataStore pds = new PropertyDataStore(data);
        rts = new RetypingDataStore(pds) {
            @Override
            protected String transformFeatureTypeName(String originalName) {
                if (originalName.equals(MockData.BUILDINGS.getLocalPart()))
                    return RENAMED;
View Full Code Here

Examples of org.geotools.data.property.ng.PropertyDataStore

        writer.write("fid1=1|LINESTRING(0 0,10 10)|jody"); writer.newLine();
        writer.write("fid2=2|LINESTRING(20 20,30 30)|brent"); writer.newLine();
        writer.write("fid3=3|LINESTRING(5 0, 5 10)|dave"); writer.newLine();
        writer.write("fid4=4|LINESTRING(0 5, 5 0, 10 5, 5 10, 0 5)|justin");
        writer.close();
        store = new PropertyDataStore( file, "propertyTestData" );
       
        // Create a similar data store but with srid in the geometry column
        File dir2 = new File(".", "propertyTestData2");
        dir2.mkdir();
        File file2 = new File(dir2, "road2.properties");
        if (file2.exists()) {
            file2.delete();
        }
        BufferedWriter writer2 = new BufferedWriter(new FileWriter(file2));
        writer2.write("_=id:Integer,geom:Geometry:srid=4283");
        writer2.newLine();
        writer2.write("fid1=1|LINESTRING(0 0,10 10)");
        writer2.newLine();
        writer2.write("fid2=2|LINESTRING(20 20,30 30)");
        writer2.newLine();
        writer2.write("fid3=3|LINESTRING(5 0, 5 10)");
        writer2.newLine();
        writer2.write("fid4=4|LINESTRING(0 5, 5 0, 10 5, 5 10, 0 5)");
        writer2.close();
        sridStore = new PropertyDataStore( file2, "propertyTestData2" );

        super.setUp();
    }
View Full Code Here

Examples of org.geotools.data.property.ng.PropertyDataStore

        writer.write("fid2=2|brent"); writer.newLine();
        writer.write("fid3=3|dave"); writer.newLine();
        writer.write("fid4=4|justin"); writer.newLine();
        writer.write("fid5=5|");
        writer.close();
        store = new PropertyDataStore( file, "propertyTestData" );
       
        file = new File( dir ,"dots.in.name.properties");
        if( file.exists()){
            file.delete();
        }       
        writer = new BufferedWriter( new FileWriter( file ) );
        writer.write("_=id:Integer,name:String"); writer.newLine();
        writer.write("fid1=1|jody"); writer.newLine();
        writer.write("fid2=2|brent"); writer.newLine();
        writer.write("fid3=3|dave"); writer.newLine();
        writer.write("fid4=4|justin");
        writer.close();
        storeDots = new PropertyDataStore( file, "propertyTestData" );
       
        file = new File( dir ,"multiline.properties");
        if( file.exists()){
            file.delete();
        }       
        writer = new BufferedWriter( new FileWriter( file ) );
        writer.write("_=id:Integer,name:String"); writer.newLine();
        writer.write("fid1=1|jody \\"); writer.newLine();
        writer.write("       garnett"); writer.newLine();
        writer.write("fid2=2|brent"); writer.newLine();
        writer.write("fid3=3|dave"); writer.newLine();
        writer.write("fid4=4|justin\\\n");
        writer.close();
        storeMultiline = new PropertyDataStore( file, "propertyTestData" );

        file = new File( dir ,"table.properties");
        if( file.exists()){
            file.delete();
        }       
        writer = new BufferedWriter( new FileWriter( file ) );
        writer.write("_=description:String,name:String"); writer.newLine();
        writer.write("GenericEntity.f004=description-f004|name-f004"); writer.newLine();
        writer.write("GenericEntity.f003=description-f003|<null>"); writer.newLine();
        writer.write("GenericEntity.f007=description-f007|"); writer.newLine();
        writer.write("  GenericEntity.f009=description-f009| "); writer.newLine();
        writer.close();
        storeTable = new PropertyDataStore( file, "propertyTestData" );

        super.setUp();
    }
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.