# Presentation: 155966

## Using Java Graphics to Display Ocean Observations in NOAAServer

- D.W. DenboJoint Institute for the Study of Ocean and Atmosphere (JISAO),University of Washington, Seattle, WA

*(JISAO is a joint institute of the University of Washington and the National Oceanic and Atmospheric Administration's Pacific Marine Environmental Laboratory)*

- _[“http://www.epic.noaa.gov/NOAAServer/sgt”](http://www.epic.noaa.gov/NOAAServer/sgt)_

## Introduction

- NOAAServer Project was created to provide a view of NOAA’s on-line information free of organizational boundaries.
- To accomplish this goal NOAAServer applies a combination of World Wide Web and network computing technologies.
- Java graphics enables highly interactive client-side graphics.

*NOAAServer Project was established by and is managed out of the **Environmental Services Data and Information Management (ESDIM) office.*

- 15th IIPS, Dallas, TX

- January 14, 1999

## Design Goals

- Allow graphics developer flexibility and freedom
- GIS style layer approach
- Support several display types
- X-Y plot
- 2-D contour and “pixel” plots
- Vector plot
- Point-Value plot
- Develop a framework that can be easily extended

- 15th IIPS, Dallas, TX

- January 14, 1999

## Implementation

- Two coordinate systems
- physical
- user
- Three main components
- Pane
- Layer
- LineKey
- SGLabel
- Graph
- Axes
- Renderer

- 15th IIPS, Dallas, TX

- January 14, 1999

## Mouse Events

- Mouse events are pre-processed by Pane
- Events passed to user are
- Object selection
- Zoom rectangle selected
- Events processed by sgt are
- Object move
- Line hi-lighting

- 15th IIPS, Dallas, TX

- January 14, 1999

## Graphics Data Model

- Data model needs to
- support X-Y, contour, raster, vector, and point plots
- be compact and “light-weight” for client-server Web
- Accomplish the above by
- supporting “plottable” objects
- one- and two-dimensional arrays
- coordinate information
- units and titles
- data models implemented using java interfaces

- 15th IIPS, Dallas, TX

- January 14, 1999

## Graphics Data Model

- Graphics Data Model

- Primitive Data Types
- SGTPoint
- SGTLine
- SGTGrid (2-dimensional)
- SGTVector (2-component)
- SGTImage
- SGTMetaData
- getName()
- getUnits()
- isModulo()
- getProperties()

- 15th IIPS, Dallas, TX

- January 14, 1999

## NOAAServer Application

- Client allows user to
- select a remote dataset
- navigate through the dataset
- receive the data request
- graphically display the data
- SGT used to display data in an independent window
- Layouts construct a graph, manage zooming, and add datasets to the graphs

- 15th IIPS, Dallas, TX

- January 14, 1999

## Slide 9

- 15th IIPS, Dallas, TX

- January 14, 1999

## Station Locations

- Uses StationPlotLayout with
- LineCartesianRenderer
- Multiple SGTLine objects
- LineAttribute set for MARK style
- Layout uses different plot marks for each set of stations
- LineKey used to identify each set of stations
- Supports zooming

- 15th IIPS, Dallas, TX

- January 14, 1999

## Slide 11

- 15th IIPS, Dallas, TX

- January 14, 1999

## Time Series Plot

- Uses LineTimeSeriesLayout
- LineCartesianRenderer
- Multiple SGTLine objects
- LineAttribute set for SOLID lines
- Layout uses different pen colors for each line
- LineKey used to identify each station
- Supports zooming

- 15th IIPS, Dallas, TX

- January 14, 1999

## Slide 13

- 15th IIPS, Dallas, TX

- January 14, 1999

## Raster Time Series Plot

- Uses RasterTimeSeriesLayout with
- RasterCartesianRenderer
- Single SGTGrid object
- ColorMap used to map temperature to a color
- ColorKey graphically displays the mapping

- 15th IIPS, Dallas, TX

- January 14, 1999

## Slide 15

- 15th IIPS, Dallas, TX

- January 14, 1999

## Future Directions

- Next major version will include Java2D capabilities
- Line widths
- Dash styles
- More font control for Labels
- Arbitrary rotated text
- Implement MapGraph and supporting classes

- 15th IIPS, Dallas, TX

- January 14, 1999

## References

- Brazille, W., D.W. Denbo, and W.H. Zhu, 1997. NOAAServer Version 2 Co-plotting Prototype. Presented at *NOAA WebShop97*, October 22-23, 1997, Silver Spring, Maryland.
- _[Denbo, D.W., 1998. Scigraph: Object-Oriented 2D Scientific Graphics Library](http://merlin.pmel.noaa.gov/dwd/talks/ams98_scigraph/)__. Presented at the _*14th International Conference on Interactive Information and Processing Systems for Meteorology, Oceanography, and Hydrology*, January 12-16, 1998, Phoenix, Arizona.
- _[Denbo, D.W., 1997. NOAAServer Graphics Engine Architecture](http://merlin.pmel.noaa.gov/dwd/talks/WebShop97/SciGraph/)__. Presented at _*NOAA WebShop97*, October 22-23, 1997, Silver Spring, Maryland.

- 15th IIPS, Dallas, TX

- January 14, 1999