public class ContourProcess extends Object implements RasterProcess
You can specify the specific values for which contours will be generated, or alternatively the interval between contour values.
Contours are returned as a feature collection, where each feature has, as its default
geometry, a LineString for the contour ("the_geom"), and the contour value as the
Double
attribute "value".
Constructor and Description |
---|
ContourProcess() |
Modifier and Type | Method and Description |
---|---|
SimpleFeatureCollection |
execute(GridCoverage2D gc2d,
Integer band,
double[] levels,
Double interval,
Boolean simplify,
Boolean smooth,
Geometry roi,
ProgressListener progressListener) |
static SimpleFeatureCollection |
process(GridCoverage2D gc2d,
Integer band,
double[] levels,
Double interval,
Boolean simplify,
Boolean smooth,
Geometry roi,
ProgressListener progressListener)
Perform the contouring on the input GridCoverage2D and returns the results as a
feature collection.
|
public static SimpleFeatureCollection process(GridCoverage2D gc2d, Integer band, double[] levels, Double interval, Boolean simplify, Boolean smooth, Geometry roi, ProgressListener progressListener) throws ProcessException
levels
argument, or by specifying the interval between contour
values via the interval
argument. In the interval case, the resulting contour values
will be integer multiples of the specified interval. If both levels
and interval
are supplied the interval
argument is ignored.data
- the input grid coverageband
- the coverage band to process; defaults to 0 if null
levels
- the values for which contours should be generatedinterval
- the interval between contour values (if levels
is not provided)simplify
- whether to simplify contour lines by removing co-linear vertices; default is
to simplifysmooth
- whether to apply Bezier smooth to the contours; default is no smoothingroi
- an optional polygonal Geometry
to define the region of interest within
which contours will be generatedDouble
ProcessException
public SimpleFeatureCollection execute(GridCoverage2D gc2d, Integer band, double[] levels, Double interval, Boolean simplify, Boolean smooth, Geometry roi, ProgressListener progressListener) throws ProcessException
ProcessException
Copyright © 1996–2019 Geotools. All rights reserved.