### Eclipse Workspace Patch 1.0 #P gt-property Index: src/test/java/org/geotools/data/property/PropertyDataStore2Test.java =================================================================== --- src/test/java/org/geotools/data/property/PropertyDataStore2Test.java (revision 35877) +++ src/test/java/org/geotools/data/property/PropertyDataStore2Test.java (working copy) @@ -24,13 +24,19 @@ import org.geotools.data.DefaultQuery; import org.geotools.data.simple.SimpleFeatureCollection; +import org.geotools.data.simple.SimpleFeatureIterator; import org.geotools.data.simple.SimpleFeatureSource; import org.geotools.referencing.CRS; +import org.opengis.feature.Property; +import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.opengis.feature.type.GeometryDescriptor; +import org.opengis.feature.type.GeometryType; import org.opengis.filter.Filter; import org.opengis.referencing.crs.CoordinateReferenceSystem; +import com.vividsolutions.jts.geom.Geometry; + /** * Test non functionality of PropertyDataStore. * @@ -39,6 +45,8 @@ */ public class PropertyDataStore2Test extends TestCase { PropertyDataStore store; + + PropertyDataStore sridStore; /** * Constructor for SimpleDataStoreTest. * @param arg0 @@ -62,6 +70,27 @@ writer.write("fid4=4|LINESTRING(0 5, 5 0, 10 5, 5 10, 0 5)|justin"); writer.close(); store = new PropertyDataStore( dir ); + + // 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(dir2); + super.setUp(); } protected void tearDown() throws Exception { @@ -71,10 +100,49 @@ list[i].delete(); } dir.delete(); + + dir = new File( "propertyTestData2" ); + File list2[] = dir.listFiles(); + for( int i=0; i