Class ReprojectFeatureReader

  • All Implemented Interfaces:
    Closeable, AutoCloseable, DelegatingFeatureReader<SimpleFeatureType,​SimpleFeature>, FeatureReader<SimpleFeatureType,​SimpleFeature>

    public class ReprojectFeatureReader
    extends Object
    implements DelegatingFeatureReader<SimpleFeatureType,​SimpleFeature>
    ReprojectFeatureReader provides a reprojection for FeatureTypes.

    ReprojectFeatureReader is a wrapper used to reproject GeometryAttributes to a user supplied CoordinateReferenceSystem from the original CoordinateReferenceSystem supplied by the original FeatureReader.

    Example Use:

    
     ReprojectFeatureReader reader =
         new ReprojectFeatureReader( originalReader, reprojectCS );
    
     CoordinateReferenceSystem originalCS =
         originalReader.getFeatureType().getDefaultGeometry().getCoordinateSystem();
    
     CoordinateReferenceSystem newCS =
         reader.getFeatureType().getDefaultGeometry().getCoordinateSystem();
    
     assertEquals( reprojectCS, newCS );
     
    TODO: handle the case where there is more than one geometry and the other geometries have a different CS than the default geometry
    Author:
    jgarnett, Refractions Research, Inc., aaime, $Author: jive $ (last modification)