Howdy,
I've found that the GeoTools ArcSDE plugin is forcing the return of the
shape column when using a spatial filter even when the geometry is not one
of the attributes requested in the query, and to my thinking it doesn't have
to since the spatial filtering should be being performed on the ArcSDE
server, not in GeoTools.
Am I correct or missing something here and this is the expected behaviour?
I've tested this in 2.5.x and 2.6.x
In my situation I'm trying to return all the values from a single attribute
column (not the shape column) that fall within a polygon, but because the
underlying feature reader and attribute reader are having to parse and build
the geometry for each feature returned (even though it's then ignored) the
performance of the iteration is orders of magnitude worse than it should be.
String typeName = "...";
String keyColumn = "...";
Filter intersectFilter = ...;
Query query = new DefaultQuery(typeName, intersectFilter, new String[] {
keyColumn });
FeatureReader<SimpleFeatureType, SimpleFeature> fr =
ds.getFeatureReader(query, Transaction.AUTO_COMMIT);
while (fr.hasNext()) {
Feature feature = fr.next(); // takes too long because it's building
geometry it doesn't need
...
}
It seems to me it's the org.geotools.filterFilterAttributeExtractor saying
that the SHAPE column is needed but it isn't and I can't see from there how
to alter this.
Cheers,
Shaun
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users