//this is the raw "unprojected" feature collection
SimpleFeatureCollection fc = source.getFeatures(newQuery);
// apply sorting if necessary
if(sortBy != null) {
fc = new SortedSimpleFeatureCollection(fc, sortBy);
}
//apply limit offset if necessary
if (offset != null || maxFeatures != null) {
fc = new MaxSimpleFeatureCollection(fc, offset == null ? 0 : offset,