Class FIDFeatureReader

  • All Implemented Interfaces:
    Closeable, AutoCloseable, FeatureReader<SimpleFeatureType,​SimpleFeature>

    public class FIDFeatureReader
    extends Object
    implements FeatureReader<SimpleFeatureType,​SimpleFeature>
    Experimental FeatureReader that always takes the first column of the attributeReader as the FeatureID. I want to get this working with postgis, but then will consider other options, for those who want featureIDs created automatically. Perhaps a constructor param or a method to say that you would just like to have the FeatureReader increment one for each feature, prepending the typeName. I'm also don't really like the one argument constructor defaulting to the xxx typename. I feel that it should perhaps take a typename. If people deliberately set to null then we could use xxx or something. ch

    This now feels sorta hacky, I'm not sure that I like it, but I'm going to commit as I need to go now and revisit it in a bit. I think the idea of passing in an FIDAttributeReader might be cleaner, and if none is provided then do an auto-increment one. This might then work as the DefaultFeatureReader.

    Author:
    Ian Schneider, Chris Holmes, TOPP