FeatureReader<SimpleFeatureType, SimpleFeature> newfr = reader;
if (query != null && query.getMaxFeatures() != Integer.MAX_VALUE){
newfr = new MaxFeatureReader<SimpleFeatureType, SimpleFeature>(newfr, query.getMaxFeatures());
}
if (this.reproject != null){
newfr = new ReprojectFeatureReader(newfr, (SimpleFeatureType) featureType, this.reproject);
}
//creates a re-type feature reader
if (this.newFeatureType != null && !this.newFeatureType.equals(this.featureType)){
newfr = new ReTypeFeatureReader(newfr, (SimpleFeatureType)this.newFeatureType);
}