Class FootprintExtractionProcess
- Object
-
- FootprintExtractionProcess
-
- All Implemented Interfaces:
RasterProcess
public class FootprintExtractionProcess extends Object implements RasterProcess
A process to extract footprint from a raster. Result is returned as a SimpleFeatureCollection containing the Geometry of the footprint as first element of the collection.Optionally, in case the
computeSimplifiedFootprint
parameter has been set totrue
, the simplified footprint will be provided as second element of the collection.By default, the footprint is computed by looking for not-zero pixels. Luminance is computed on the input dataset and not-zero luminance pixels will be used.
An optional
exclusionRanges
parameter is supported to define which luminance values should be excluded from the search. This allows you, as an instance, to exclude "Dark pixels / Almost black pixels / White pixels" from the results.An optional
thresholdArea
parameter is supported to exclude small polygons from the final result. In case a polygon has an area (in pixels) smaller than the provided value it will not be included in the footprint. Default Threshold Area isMarchingSquaresVectorizer.DEFAULT_THRESHOLD_AREA
An optional
computeSimplifiedFootprint
parameter is supported to return a simplified version of the biggest polygon as second element of the feature collection.An optional
simplifierFactor
parameter is supported to specify the simplifier factor to be applied to get the simplified version of the Footprint.An optional
removeCollinear
parameter is supported to specify whether the collinear vertices of the retrieved polygon should be removed (Default is true)An optional
forceValid
parameter is supported to specify whether polygons should be forced to be valid (also removing holes)An optional
loadingType
parameter is supported to specify the type of imageLoading (DEFERRED vs IMMEDIATE). Default isMarchingSquaresVectorizer.ImageLoadingType.getDefault()
.- Author:
- Daniele Romagnoli, GeoSolutions SAS
-
-
Constructor Summary
Constructors Constructor Description FootprintExtractionProcess()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleFeatureCollection
execute(GridCoverage2D coverage, List<Range<Integer>> exclusionRanges, Double thresholdArea, Boolean computeSimplifiedFootprint, Double simplifierFactor, Boolean removeCollinear, Boolean forceValid, MarchingSquaresVectorizer.ImageLoadingType imageLoadingType, ProgressListener progressListener)
Executes the raster to vector process.
-
-
-
Method Detail
-
execute
public SimpleFeatureCollection execute(GridCoverage2D coverage, List<Range<Integer>> exclusionRanges, Double thresholdArea, Boolean computeSimplifiedFootprint, Double simplifierFactor, Boolean removeCollinear, Boolean forceValid, MarchingSquaresVectorizer.ImageLoadingType imageLoadingType, ProgressListener progressListener) throws ProcessException
Executes the raster to vector process.- Parameters:
coverage
- the data coverageexclusionRanges
- An optionalexclusionRanges
parameter is supported to define which luminance values should be excluded from the search. This allows you, as an instance, to exclude "Dark pixels / Almost black pixels" from the results.thresholdArea
- An optionalthresholdArea
parameter is supported to exclude small polygons from the final result. In case a polygon has an area (in pixels) smaller than the provided value it will not be included in the footprint. Default Threshold Area isMarchingSquaresVectorizer.DEFAULT_THRESHOLD_AREA
computeSimplifiedFootprint
- An optionalcomputeSimplifiedFootprint
parameter is supported to return a simplified version of the biggest polygon.simplifierFactor
- the simplifier factor to be applied to compute the simplified version of the biggest polygon.removeCollinear
- specifies whether the collinear vertices of the retrieved polygon should be removed (Default is true)forceValid
- specifies whether polygons should be forced to be valid (also removing holes)imageLoadingType
- specifies the type of imageLoading (DEFERRED vs IMMEDIATE). Default isMarchingSquaresVectorizer.ImageLoadingType.getDefault()
.- Throws:
ProcessException
-
-