Re: visad and hershey font wmo.jhf

Hi Bernd,

Nice image. In order to replace the text with weather
symbols you'll need to replace the ScalarMap to
Display.Text with a ScalarMap to Display.Shape. See
Test46.java and Test47.java in visad/examples for
simple examples of using Shape. It is also discussed
in sections 4.3.12 and 4.7 of the VisAD Developer's
Guide. You'll pass an array of VisADGeometryArrays for
your weather symbols (from wmo.jhf) to the
setShapes() method of your ShapeControl, and pass a
1-D Set to its setShapeSet() method - this Set defines
how your numerical iso values are sampled to discrete
weather symbols.

I have CC'ed the VisAD mailing list, since all technical
questions should go to the list rather than just to me.

Good luck,
Bill

On Tue, 28 Jun 2005, Wetter-Jetzt wrote:

> hi bill,
>
> sorry about my question. We are working with visad and its astonishing
> features and the wrf-model-output. Attached you find a picture of cloud
> base height / dry thermals height. We would like to paint in a more or
> less similar image, instead of the numbers, some meteorological symbols
> as contained in wmo.jhf. We fill in the numbers now via
>     double [][] cloud_base = ....some code...
> and then
>     ff_iso.setSamples(cloud_base, false );
> and further
>     ScalarMap txtMap = new ScalarMap( iso, Display.Text );
> ....
>    display.addMap( txtMap );
> ....
>    TextControl tCtl = (TextControl) txtMap.getControl();
>         try{
>                 HersheyFont fnt = new HersheyFont("meteorology");
>                 tCtl.setFont( fnt );
> .....
>
> this works well for the numbers, but what do we have to code to display
> the mentioned weather symbols?
>
> I would be very happy to get some advice from you.
>
> thanks
> bernd goretzki
>
> _______________________________________
>
>  Dr. Bernd Goretzki
>  Diplom Meteorologe
>
>  Phone: +49 33843 41925
>  Fax:   +49 33843 41927
>
>  Wetter-Jetzt GbR
>  Hauptstraße 4
>  D-14806 Planetal-Locktow
> _______________________________________
>
>  Anerkannter Beratender Meteorologe DMG
> (Deutsche Meteorologische Gesellschaft)
> _______________________________________
>
>  Wetter für Flieger
>  http://www.wetter-jetzt.de/webshop
> _______________________________________
>
>



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