Possible bug in geotools 2.6.0 in filtering (big) shapefiles...

1 message Options
Embed this post
Permalink
gershwinou

Possible bug in geotools 2.6.0 in filtering (big) shapefiles...

Reply Threaded More More options
Print post
Permalink
Dear all,

I have just come accross a weird issue with geotools 2.6.0

this piece of code is working well with geotools 2.5.1 (ie returning a couple of multipolygons bboxed from the original file (gshhs for those who knows, big shapefile~170MB):

            DataStore dataStore = DataStoreFinder.getDataStore(
config);
            FeatureSource featureSource = dataStore.getFeatureSource(dataStore.getTypeNames()[0]);
            String geomName = featureSource.getSchema().getGeometryDescriptor().getLocalName(); // ie geomName="the_geom"

            double minx = ...;
            double maxx = ...;
            double miny = ...;
            double maxy = ...;

            Filter filter=CQL.toFilter("BBOX("+geomName+","+minx+","+miny+","+maxx+","+maxy+")");

            FeatureCollection fc = DataUtilities.collection(featureSource.getFeatures(filter));

However, switching to 2.6.0, i get an empty FeatureCollection (ie fc.isEmpty() is true). When i remove the filtering, i get the features (not filtered of course)
Any deprecated function i missed somewhere?


with small shapefiles, it seems ok (ie did not get that problem)...

Gersh

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users