Class FootprintExtractionProcess
- All Implemented Interfaces:
RasterProcess
Optionally, in case the computeSimplifiedFootprint
parameter has been set to true
, 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 is MarchingSquaresVectorizer.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 is MarchingSquaresVectorizer.ImageLoadingType.getDefault()
.
- Author:
- Daniele Romagnoli, GeoSolutions SAS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute
(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.
-
Constructor Details
-
FootprintExtractionProcess
public FootprintExtractionProcess()
-
-
Method Details
-
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
-