Class ProfilerMultiStationControl

All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, ControlListener, DisplayListener

public class ProfilerMultiStationControl extends ProfilerControl
Given an earth-located VisAD Field of multi-station NOAA Profiler data, make a mapped wind data display, and make related controls. Uses FieldImpl with VisAD function (Time -> ((LAT,LON,Z) -> (DIR, SPD)) where time values are VisAD Datetime objects, Z has RealType RealType.Altitude, DIR and SPD have RealType Display.Flow1Azimuth and Display.Flow1Radial, The data display is in the main IDV 3D view manager.
Version:
$Revision: 1.44 $
Author:
Unidata IDV development
  • Constructor Details

    • ProfilerMultiStationControl

      public ProfilerMultiStationControl()
      Default constructor; does nothing. See init() for creation actions.
  • Method Details

    • init

      public boolean init(DataChoice dataChoice) throws VisADException, RemoteException
      Construct the Displayable and controls; get and load data in display.
      Overrides:
      init in class DisplayControlImpl
      Parameters:
      dataChoice - the DataChoice to use
      Returns:
      boolean true if DataChoice is ok.
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • checkDataLevelValue

      public boolean checkDataLevelValue(float zlevel) throws VisADException, RemoteException
      check the input zlevel is not too high for the obs data point
      Parameters:
      zlevel - The level
      Returns:
      true if we have the level
      Throws:
      RemoteException - Java RMI Exception
      VisADException - Problem creating data
    • loadData

      public void loadData() throws VisADException, RemoteException
      Load the data
      Throws:
      RemoteException - Java RMI error
      VisADException - error loading data
    • getGridDataInstance

      public GridDataInstance getGridDataInstance()
      A utility to cast the getDataInstance as a GridDataInstance
      Returns:
      the GridDataInstance
    • doMakeDataInstance

      protected DataInstance doMakeDataInstance(DataChoice dataChoice) throws RemoteException, VisADException
      Creates and returns the GridDataInstance corresponding to a DataChoice. Returns null if the DataInstance was somehow invalid.
      Overrides:
      doMakeDataInstance in class DisplayControlImpl
      Parameters:
      dataChoice - The DataChoice from which to create a DataInstance.
      Returns:
      The created DataInstance or null.
      Throws:
      VisADException - if a VisAD Failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • setData

      protected boolean setData(DataChoice dataChoice) throws VisADException, RemoteException
      Get FieldImpl with data to display, from the DataChoice.
      Overrides:
      setData in class DisplayControlImpl
      Parameters:
      dataChoice - the DataChoice to use
      Returns:
      true if DataChoice is ok.
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • doMakeExtraComponent

      protected JComponent doMakeExtraComponent()
      Make extra component for UI
      Overrides:
      doMakeExtraComponent in class ProfilerControl
      Returns:
      extra UI component
    • setIsPlanView

      public void setIsPlanView(boolean value)
      Set the IsPlanView property.
      Parameters:
      value - The new value for IsPlanView
    • getIsPlanView

      public boolean getIsPlanView()
      Get the IsPlanView property.
      Returns:
      The IsPlanView property
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Override the base class method to catch any events.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class ProfilerControl
      Parameters:
      e - The action event.
    • setLevel

      public void setLevel(float value)
      Set the value of the level.
      Parameters:
      value - the level.
    • getLevel

      public float getLevel()
      Get the value of the level.
      Returns:
      the level.
    • setVerticalInterval

      public void setVerticalInterval(float value)
      Change vertical separation of wind barbs in meters, to a different vertical interval. Used for 3D Views of Profiler wind - not for plan view(station plot)
      Overrides:
      setVerticalInterval in class ProfilerControl
      Parameters:
      value - a float the vertical separation in meters
    • resetDataVerticalLocation

      public void resetDataVerticalLocation(Real verticalInt, float zlevel, boolean use3D) throws VisADException, RemoteException
      Sample the data grid for values at the vertical interval or spacing set by input value; load that possibly-reduced data in the displayable. If use3D is true, show data which are near the spacing given by (float) verticalInt.getValue() If use3D is false, show data only at zLevel or within 125 meters of it
      Parameters:
      verticalInt - sampling interval such as 500 m; IF use3D==true
      zlevel - - plan view level of winds from Profiler; IF use3D false
      use3D - boolean true for all data in 3d; false for plan view at one level above MSL only.
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • setFlowScale

      public void setFlowScale(float value)
      Set the length of the wind barb
      Overrides:
      setFlowScale in class ProfilerControl
      Parameters:
      value - the length of the wind barb
    • getInitialRange

      protected Range getInitialRange() throws RemoteException, VisADException
      Get the initial range for the color table
      Overrides:
      getInitialRange in class DisplayControlImpl
      Returns:
      the initial range
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • getDataProjection

      public MapProjection getDataProjection()
      Get the MapProjection for this data; if have a single point data object make synthetic map projection for location
      Specified by:
      getDataProjection in interface DisplayControl
      Overrides:
      getDataProjection in class DisplayControlImpl
      Returns:
      MapProjection for the data