CoordinateReferenceSystem dataCRS) {
FeatureReader<SimpleFeatureType, SimpleFeature> tmp = reader;
if (query.getCoordinateSystem() != null
&& !query.getCoordinateSystem().equals(reader.getFeatureType().getCoordinateReferenceSystem())) {
try {
reader = new ForceCoordinateSystemFeatureReader(reader, query.getCoordinateSystem());
} catch (SchemaException e) {
WFS_1_0_0_DataStore.LOGGER.warning(e.toString());
reader = tmp;
}
} else {
if (reader.getFeatureType().getGeometryDescriptor() != null && dataCRS != null
&& reader.getFeatureType().getCoordinateReferenceSystem() == null) {
// set up crs
try {
reader = new ForceCoordinateSystemFeatureReader(reader, dataCRS);
} catch (SchemaException e) {
WFS_1_0_0_DataStore.LOGGER.warning(e.toString());
reader = tmp;
}
}