NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [idvusers] help with Blue Marble Images and IDV codebase

Hi Stuart-

Try using the ImageRGBDisplayable instead.  As a test, use the IDV
to load in the image and then use the Imagery->Geolocate an Image
formula to navigate it.  Essentially, that formula does what
you do below.

Don

Stuart Maclean wrote:
I am trying to incorporate Blue Marble Next Gen images into an IDV based app.

The images have Plat Carre map projection, a very simple lat -> y, lon -> x.

I load the image, using e.g. GIFAdapter and then use DataUtility to get a 
FlatField, call it f1, whose mathtype is

((ImageElement, ImageLine) -> (Red, Green, Blue))

(I actually snip/crop the orig image using BufferedImage.getSubimage but i 
think that is working ok)

I then build a new FlatField f2 with domain SpatialEarth2DTuple and same range as f1. I am calling f2.setSamples(f1.getFloats(false)) to transfer the range values. (I suspect that I should be using a CoordinateSystem somewhere here to transform ElementLine -> Lon etc ??)

If I then take f2 and build a visad style of DisplayImpl, with 5 scalar maps (lat,lon,r,g,b) and a single DataReferenceImpl, then the image shows up as expected in the displayImpl.

But I have got used to using IDV's DisplayMaster and subclasses of Displayable. For instance, I load bathy data into a Contour2DDisplayable and that works great. I get all the map projection stuff for free with the IDV classes.

My actual problem is that I think I am supposed to be using Grid2DDisplayable to incorporate my flatfield f2 into an IDV DisplayMaster. Alas it is not working. I see no image data. Is this the wrong class? It subclasses RGBDisplayable so I thought I was on the right track.

Any help gratefully appreciated.

Stuart Maclean



_______________________________________________
idvusers mailing list
idvusers@xxxxxxxxxxxxxxxx
For list information, to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/

--
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************



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