Search in sources :

Example 6 with ReprojectMapper

use of org.geotoolkit.feature.ReprojectMapper in project geotoolkit by Geomatys.

the class ReprojectProcess method execute.

/**
 *  {@inheritDoc }
 */
@Override
protected void execute() {
    final FeatureCollection inputFeatureList = inputParameters.getValue(VectorDescriptor.FEATURE_IN);
    final CoordinateReferenceSystem targetCRS = inputParameters.getValue(ReprojectDescriptor.CRS_IN);
    final FeatureCollection resultFeatureList = FeatureStreams.decorate(inputFeatureList, new ReprojectMapper(inputFeatureList.getType(), targetCRS));
    outputParameters.getOrCreate(VectorDescriptor.FEATURE_OUT).setValue(resultFeatureList);
}
Also used : FeatureCollection(org.geotoolkit.storage.feature.FeatureCollection) ReprojectMapper(org.geotoolkit.feature.ReprojectMapper) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem)

Aggregations

ReprojectMapper (org.geotoolkit.feature.ReprojectMapper)6 Feature (org.opengis.feature.Feature)5 Test (org.junit.Test)3 Coordinate (org.locationtech.jts.geom.Coordinate)3 FeatureType (org.opengis.feature.FeatureType)3 CoordinateReferenceSystem (org.opengis.referencing.crs.CoordinateReferenceSystem)3 FeatureTypeBuilder (org.apache.sis.feature.builder.FeatureTypeBuilder)2 Geometry (org.locationtech.jts.geom.Geometry)2 Point (org.locationtech.jts.geom.Point)2 ArrayList (java.util.ArrayList)1 Hints (org.geotoolkit.factory.Hints)1 AbstractGeometry (org.geotoolkit.gml.xml.AbstractGeometry)1 FeatureProperty (org.geotoolkit.gml.xml.FeatureProperty)1 SamplingFeature (org.geotoolkit.sampling.xml.SamplingFeature)1 CheckCloseFeatureIterator (org.geotoolkit.storage.feature.CheckCloseFeatureIterator)1 FeatureCollection (org.geotoolkit.storage.feature.FeatureCollection)1 FeatureReader (org.geotoolkit.storage.feature.FeatureReader)1 Query (org.geotoolkit.storage.feature.query.Query)1 AttributeType (org.opengis.feature.AttributeType)1 Operation (org.opengis.feature.Operation)1