public class FootprintExtractionProcess extends Object implements 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()
.
Constructor and Description |
---|
FootprintExtractionProcess() |
Modifier and Type | Method and 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.
|
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
coverage
- the data coverageexclusionRanges
- 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" from the results.thresholdArea
- 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
computeSimplifiedFootprint
- An optional computeSimplifiedFootprint
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.imageLoadingType
- the type of imageLoading (DEFERRED vs IMMEDIATE).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
is MarchingSquaresVectorizer.ImageLoadingType.getDefault()
.progressListener
- ProcessException
Copyright © 1996–2019 Geotools. All rights reserved.