Closed timkeane closed 7 years ago
The Feature ID is controlled by the Workspace (GeoTools DataStore). The way you are creating Layers is actually using a Memory Workspace behind the scenes. It creates ids like 'fid-4a2c899615b3b3e6f5b-7ffc'. If you use a Directory Workspace (which creates Shapefiles) you get an id like 'myLayer.1'.
The GeoTools docs have a good explanation: http://docs.geotools.org/stable/userguide/library/data/featuresource.html (look for Handling of FeatureID).
I hope that helps.
https://github.com/timkeane/geoscript-test/blob/master/src/test/groovy/nyc/FeatureIdTest.groovy