Class 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 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 Detail

      • FootprintExtractionProcess

        public FootprintExtractionProcess()
    • 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 coverage
        exclusionRanges - 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.
        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().
        Throws:
        ProcessException