Re: elevation becomes altitude



I also want to keep my temperature units as Celsius or Farenheit rather than have them converted to Kelvin. Can I accomplish this in the same way?

Plain won't change the units used by the incoming data.  If the data in
the dataset is in degrees Celsius, then a FlatField created from that
data will also have degrees Celsius.  The default unit of the RealType,
however, will be that of the quantity in the netCDF quantity database.

If you want to display a given quantity in a given unit, then you should
invoke ScalarMap.setOverrideUnit(Unit) on the relevant ScalarMap.

Similarly, if you want to override the name of a RealType (e.g. you want
"Elevation" rather than "Altitude"), then invoke RealType.alias(String)
on the relevant RealType.

Ack - so, I'll need to override the setMaps() method in FancySSCell such that it will call setOverrideUnit() on any new map? Then I'll also need to override addDataSource() in BasicSSCell to fix the RealTypes of any data sets I open?

-john


  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: