[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20050331: StationModelDisplayable -plots of point data in main display

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: 20050331: StationModelDisplayable -plots of point data in main display
  • Date: Fri, 01 Apr 2005 09:58:55 -0700



Yes I have "EQSymbol" StainCrossSymbol etc., and corresponding entries in the
stationsymbols.xml.  But those only draw symbols in the station model editor, 
right?
At least they did in the old version. I need code such as is (or was) in StationModelDisplayable.java and ShapeUtility.java that draws the point obs in the main display.

Yes, they should show up in the station model editor. What you want to do is to move the code that created
the visad geometry arrays into methods in EQSymbol, StrainCrossSymbol, etc.
Look at ucar.unidata.ui.symbol.LabelSymbol

The idea is that the StationModelDisplayable looks at each MetSymbol in the station model. If the MetSymbol returns false in the call doAllObs (the default) the displayable tries to find the data objects in the point ob that correspond to the parameter name of the MetSymbol.
If it cannot find them then it skips that symbol.

If the MetSymbol returns true from doAllObs then the displayable simply passes the point ob to the met symbol
which returns the shapes to use. e.g.:
               if (metSymbol.doAllObs()) {
                   shapes = metSymbol.makeShapes(ob);
                } ...
else the displayable handles the creation of the shape array for known MetSymbol classes (e.g., WindBarbSymbol, WeatherSymbol, etc.) If it doesn't know how to handle the MetSymbol
it calls the method:
               } else {
                   //Default is to ask the symbol to make the shapes
                   shapes = metSymbol.makeShapes(dataArray, ob);
               }

I hope that clears things up.

-Jeff