ShapefileDataStore ds = (ShapefileDataStore) new ShapefileDataStoreFactory().createDataStore(params);
FeatureReader<SimpleFeatureType, SimpleFeature> reader;
if (isFilterBeforeScreenMap && filterFid != null) {
FilterFactory2 factory = CommonFactoryFinder.getFilterFactory2(null);
Id id = factory.id(Collections.singleton(ff.featureId(shpName + "."
+ filterFid.toString())));
reader = ds.getFeatureReader(new Query(ds.getTypeNames()[0], id),
Transaction.AUTO_COMMIT);
} else {
reader = ds.getFeatureReader();