public class PolygonExtractionProcess extends Object implements RasterProcess
Polygon
as its default geometry ("the_geom") and the
value of the raster region cells as an attribute ("value").
Optionally, a list of classification ranges (Range objects) can be provided to pre-classify the input coverage values into intervals. Vectorizing can also be restricted to a sub-area of the coverage and/or a subset of raster values (by defining values to treat as no-data).
Constructor and Description |
---|
PolygonExtractionProcess() |
Modifier and Type | Method and Description |
---|---|
SimpleFeatureCollection |
execute(GridCoverage2D coverage,
Integer band,
Boolean insideEdges,
Geometry roi,
Collection<Number> noDataValues,
List<Range> classificationRanges,
ProgressListener progressListener)
Executes the raster to vector process.
|
public SimpleFeatureCollection execute(GridCoverage2D coverage, Integer band, Boolean insideEdges, Geometry roi, Collection<Number> noDataValues, List<Range> classificationRanges, ProgressListener progressListener) throws ProcessException
coverage
- the input grid coverageband
- the coverage band to process; defaults to 0 if null
insideEdges
- whether boundaries between raster regions with data values (ie. not
NODATA) should be returned; defaults to true
if null
roi
- optional polygonal Geometry
to define a sub-area within which vectorizing
will be donenoDataValues
- optional list of values to treat as NODATA; regions with these values
will not be represented in the returned features; if null
, 0 is used as the
single NODATA value; ignored if classificationRanges
is providedclassificationRanges
- optional list of Range
objects to pre-classify the input
coverage prior to vectorizing; values not included in the list will be treated as NODATA;
values in the first Range
are classified to 1, those in the second Range
to 2 etc.progressListener
- an optional listenerPolygon
("the_geom") and an
attribute "value" with value of the corresponding region in either coverage
or
the classified coverage (when classificationRanges
is used)ProcessException
Copyright © 1996–2019 Geotools. All rights reserved.