Package noaa.coastwatch.render
Class TopographyOverlay
java.lang.Object
noaa.coastwatch.render.EarthDataOverlay
noaa.coastwatch.render.LineOverlay
noaa.coastwatch.render.TopographyOverlay
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable
A topography overlay annotates an earth data view with topography
lines. The topography lines are rendered from ETOP05 elevation
data using the
ContourGenerator
class. ETOP05 data has a spatial resolution of 5 minutes and a
digitization accuracy of 1 meter. Information on ETOP05 may be
found at:
http://www.ngdc.noaa.gov/mgg/global/global.html
http://sis.agr.gc.ca/cansis/nsdb/ecostrat/elevation.html
- Since:
- 3.1.7
- Author:
- Peter Hollemans
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int[]
The default bathymetry contour levels.static final int[]
The default topography contour levels.Fields inherited from class noaa.coastwatch.render.LineOverlay
drawingShadow
Fields inherited from class noaa.coastwatch.render.EarthDataOverlay
alpha, lastTrans, prepared
-
Constructor Summary
ConstructorDescriptionTopographyOverlay
(Color color) Constructs a new topography overlay.TopographyOverlay
(Color color, int layer, Stroke stroke) Constructs a new topography overlay. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
draw
(Graphics2D g, EarthDataView view) Draws the overlay graphics.int[]
Gets the topography levels.protected void
prepare
(Graphics2D g, EarthDataView view) Prepares the overlay graphics prior to drawing.void
setLevels
(int[] levels) Sets the topography levels.Methods inherited from class noaa.coastwatch.render.LineOverlay
clip, drawShadow, getDropShadow, getShadowColor, getStroke, render, setDropShadow, setStroke
Methods inherited from class noaa.coastwatch.render.EarthDataOverlay
clone, compareTo, getAlphaVersion, getColor, getColors, getColorWithAlpha, getLayer, getMetadataAtPoint, getName, getTransparency, getVisible, hasMetadata, invalidate, isPrepared, needsPrepare, setColor, setLayer, setName, setTransparency, setVisible, toString
-
Field Details
-
TOPO_LEVELS
public static final int[] TOPO_LEVELSThe default topography contour levels. -
BATH_LEVELS
public static final int[] BATH_LEVELSThe default bathymetry contour levels.
-
-
Constructor Details
-
TopographyOverlay
Constructs a new topography overlay.- Parameters:
color
- the overlay color.layer
- the overlay layer number.stroke
- the stroke to use for vector paths.- Throws:
IOException
- if a problem occurs accessing the topography data.
-
TopographyOverlay
Constructs a new topography overlay. The layer number is initialized to 0, and the stroke to the defaultBasicStroke
.- Parameters:
color
- the overlay color.- Throws:
IOException
- if a problem occurs accessing the topography data.
-
-
Method Details
-
getLevels
public int[] getLevels()Gets the topography levels. -
setLevels
public void setLevels(int[] levels) Sets the topography levels. -
prepare
Description copied from class:EarthDataOverlay
Prepares the overlay graphics prior to drawing.- Specified by:
prepare
in classEarthDataOverlay
- Parameters:
g
- the graphics object for drawing.view
- the earth data view.
-
draw
Description copied from class:EarthDataOverlay
Draws the overlay graphics.- Specified by:
draw
in classEarthDataOverlay
- Parameters:
g
- the graphics object for drawing.view
- the earth data view.
-