Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.6.0
-
Component/s: shapefile plugin
-
Labels:None
-
Environment:Windows XP, Java 1.5.0_16
-
Testcase included:yes
Description
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[]
);
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.