use of org.geotoolkit.storage.feature.FeatureCollection in project geotoolkit by Geomatys.
the class MaxLimitProcess method execute.
/**
* {@inheritDoc }
*/
@Override
protected void execute() {
final FeatureCollection inputFeatureList = inputParameters.getValue(FEATURE_IN);
final int max = inputParameters.getValue(MAX_IN);
final FeatureCollection resultFeatureList = FeatureStreams.limit(inputFeatureList, max);
outputParameters.getOrCreate(FEATURE_OUT).setValue(resultFeatureList);
}
use of org.geotoolkit.storage.feature.FeatureCollection in project geotoolkit by Geomatys.
the class SortByProcess method execute.
/**
* {@inheritDoc }
*/
@Override
protected void execute() {
final FeatureCollection inputFeatureList = inputParameters.getValue(VectorDescriptor.FEATURE_IN);
final org.opengis.filter.SortProperty[] sorter = inputParameters.getValue(SortByDescriptor.SORTER_IN);
final FeatureCollection resultFeatureList = FeatureStreams.sort(inputFeatureList, sorter);
outputParameters.getOrCreate(VectorDescriptor.FEATURE_OUT).setValue(resultFeatureList);
}
use of org.geotoolkit.storage.feature.FeatureCollection in project geotoolkit by Geomatys.
the class DifferenceProcess method execute.
/**
* {@inheritDoc }
*/
@Override
protected void execute() {
final FeatureCollection inputFeatureList = inputParameters.getValue(VectorDescriptor.FEATURE_IN);
final FeatureCollection inputFeatureClippingList = inputParameters.getValue(DifferenceDescriptor.FEATURE_DIFF);
final FeatureCollection resultFeatureList = new DifferenceFeatureCollection(inputFeatureList, inputFeatureClippingList);
outputParameters.getOrCreate(VectorDescriptor.FEATURE_OUT).setValue(resultFeatureList);
}
use of org.geotoolkit.storage.feature.FeatureCollection in project geotoolkit by Geomatys.
the class FilterProcess method execute.
/**
* {@inheritDoc }
*/
@Override
protected void execute() {
final FeatureCollection inputFeatureList = inputParameters.getValue(FEATURE_IN);
final org.opengis.filter.Filter filter = inputParameters.getValue(FILTER_IN);
final FeatureCollection resultFeatureList = FeatureStreams.filter(inputFeatureList, filter);
outputParameters.getOrCreate(FEATURE_OUT).setValue(resultFeatureList);
}
use of org.geotoolkit.storage.feature.FeatureCollection in project geotoolkit by Geomatys.
the class ComplexToFeatureCollectionConverterTest method testJSONConversion.
/**
* Test that the conversion from a Data containing a FeatureCollection
* in geoJSON converts to valid FeatureCollection
*/
@Test
public void testJSONConversion() throws IOException, DataStoreException {
FeatureCollection featureCollection = ConvertersTestUtils.initAndRunInputConversion(Data.class, FeatureCollection.class, "/inputs/featurecollection.json", WPSMimeType.APP_GEOJSON.val(), WPSEncoding.UTF8.getValue(), null);
// Test the feature collection
ConvertersTestUtils.assertFeatureCollectionIsValid(featureCollection);
}
Aggregations