public FeatureReader<SimpleFeatureType, SimpleFeature> reader() throws IOException { return new DelegateFeatureReader<SimpleFeatureType, SimpleFeature>(getSchema(), features()); }
public SimpleFeatureCollection subCollection(Filter filter) { // reproject the filter to the delegate native crs CoordinateReferenceSystem crs = getSchema().getCoordinateReferenceSystem(); CoordinateReferenceSystem crsDelegate = delegate.getSchema().getCoordinateReferenceSystem(); if (crs != null) { DefaultCRSFilterVisitor defaulter = new DefaultCRSFilterVisitor(FF, crs); filter = (Filter) filter.accept(defaulter, null); if (crsDelegate != null && !CRS.equalsIgnoreMetadata(crs, crsDelegate)) { ReprojectingFilterVisitor reprojector = new ReprojectingFilterVisitor(FF, delegate.getSchema()); filter = (Filter) filter.accept(reprojector, null); } } return new ReprojectingFeatureCollection(delegate.subCollection(filter), target); }
public FeatureReader reader() throws IOException { return new DelegateFeatureReader(getSchema(), features()); }
public FeatureReader<SimpleFeatureType, SimpleFeature> reader() throws IOException { return new DelegateFeatureReader<SimpleFeatureType, SimpleFeature>(getSchema(), features()); }
public SimpleFeatureCollection subCollection(Filter filter) { // reproject the filter to the delegate native crs CoordinateReferenceSystem crs = getSchema().getCoordinateReferenceSystem(); CoordinateReferenceSystem crsDelegate = delegate.getSchema().getCoordinateReferenceSystem(); if(crs != null) { DefaultCRSFilterVisitor defaulter = new DefaultCRSFilterVisitor(FF, crs); filter = (Filter) filter.accept(defaulter, null); if(crsDelegate != null && !CRS.equalsIgnoreMetadata(crs, crsDelegate)) { ReprojectingFilterVisitor reprojector = new ReprojectingFilterVisitor(FF, delegate.getSchema()); filter = (Filter) filter.accept(reprojector, null); } } return new ReprojectingFeatureCollection(delegate.subCollection(filter), target); }