protected FeatureReader<SimpleFeatureType, SimpleFeature> applyReprojectionDecorator( FeatureReader<SimpleFeatureType, SimpleFeature> reader, Query query, GetFeatureRequest request) { FeatureReader<SimpleFeatureType, SimpleFeature> tmp = reader; if (query.getCoordinateSystem() != null && !query.getCoordinateSystem() .equals(reader.getFeatureType().getCoordinateReferenceSystem())) { if (request.getSrsName() != null) { try { reader = new ForceCoordinateSystemFeatureReader( reader, query.getCoordinateSystem()); } catch (SchemaException e) { LOGGER.warning(e.toString()); reader = tmp; } } else { try { reader = new ReprojectFeatureReader(reader, query.getCoordinateSystem()); } catch (Exception e) { LOGGER.warning(e.toString()); reader = tmp; } } } return reader; }
protected FeatureReader<SimpleFeatureType, SimpleFeature> applyReprojectionDecorator(FeatureReader <SimpleFeatureType, SimpleFeature> reader, Query query, 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; } } } return reader; }
protected FeatureReader<SimpleFeatureType, SimpleFeature> applyReprojectionDecorator( FeatureReader<SimpleFeatureType, SimpleFeature> reader, Query query, GetFeatureRequest request) { FeatureReader<SimpleFeatureType, SimpleFeature> tmp = reader; if (query.getCoordinateSystem() != null && !query.getCoordinateSystem() .equals(reader.getFeatureType().getCoordinateReferenceSystem())) { if (request.getSrsName() != null) { try { reader = new ForceCoordinateSystemFeatureReader( reader, query.getCoordinateSystem()); } catch (SchemaException e) { LOGGER.warning(e.toString()); reader = tmp; } } else { try { reader = new ReprojectFeatureReader(reader, query.getCoordinateSystem()); } catch (Exception e) { LOGGER.warning(e.toString()); reader = tmp; } } } return reader; }
throw new SchemaException("Exception creating feature type from MIF header: " + schexp.toString());
throw new SchemaException( "Exception creating feature type from MIF header: " + schexp.toString());