IndexedShapefileDataStore Query Bug
-----------------------------------

                 Key: GEOT-2782
                 URL: http://jira.codehaus.org/browse/GEOT-2782
             Project: GeoTools
          Issue Type: Bug
          Components: data shapefile
         Environment: Windows XP, Java 1.5.0_16
            Reporter: Emily Gouge
            Assignee: Andrea Aime
         Attachments: ShapefileAttributeReaderTest.java

If I query an IndexedShapefileDataStore for a subset of attributes and no 
geometry, the first attribute in the resulting feature collection is always the 
wkt version of the geometry.  This does not happen if I use a 
ShapefileDataStore.

For example in this code:

IndexedShapefileDataStore indexedstore = new 
IndexedShapefileDataStore(TestData.url(STATEPOP));
final Query query = new 
DefaultQuery(indexedstore.getSchema().getName().getLocalPart(), idFilter, new 
String[] { "STATE_NAME"});
final FeatureCollection<SimpleFeatureType, SimpleFeature> indexedfeatures = 
indexedstore.getFeatureSource().getFeatures(query);

indexedfeatures.iterator().next().getAttribute("STATE_NAME") returns 
'POLYGON((......))' which is not correct.

I've attached a test case that provides an example of this issue.  

This bug is producing invalid results in the uDig Table View.  The first 
attribute column is always displaying the geometry wkt instead of the attribute.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to