public class ContourGenerator extends LineFeatureSource
area, featureList
Constructor and Description |
---|
ContourGenerator(Grid grid,
EarthTransform trans)
Creates a new contour generator based on data in the grid.
|
Modifier and Type | Method and Description |
---|---|
double |
getLevel(int index)
Gets the contour level of the earth vector at the specified
index.
|
protected void |
select()
Selects a set of features from the data source based on the
current area.
|
void |
setFastMode(boolean flag)
Sets the fast contouring mode flag.
|
void |
setLevelNudge(double nudge)
Sets the level nudge value.
|
void |
setLevels(double[] levels)
Sets the contour levels to generate.
|
render
getArea, getAttributeCount, getAttributeNameMap, getAttributes, getFilter, iterator, select, setAttributes, setFilter
public ContourGenerator(Grid grid, EarthTransform trans)
select()
is made.grid
- the grid data for contouring.trans
- the earth transform for the grid.public void setLevelNudge(double nudge)
setLevels()
so that
limitations in the digitization accuracy do not appear as contour
problems. For example, if a contour level of 20 is requested and
the data takes on a value of exactly 20 in a group of adjacent
grid locations, then strange contour levels can result, including
thin polygons with no interior area and bullseye patterns. The
default nudge value is 0.nudge
- the level nudge value.setLevels(double[])
public void setFastMode(boolean flag)
flag
- the fast mode flag, true for fast contouring.public void setLevels(double[] levels)
levels
- the contour levels.protected void select() throws java.io.IOException
AbstractFeatureSource
select
in class AbstractFeatureSource
java.io.IOException
- if an error occurred accessing the data source.public double getLevel(int index)
index
- the earth vector index.setLevels(double[])
,
AbstractFeatureSource.iterator()