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.
When you read an OUTLxxxx file using a VisAD FileAdapter, the Data object returned is a UnionSet of Gridded2DSets which have a MathType of (Longitude, Latitude). What is inside are arrays of Latitude/Longitude pairs which follow geopolitical boundaries; each set represents one "segment". As long as you have mapped Latitude to, say, the yaxis and Longitude to the xaxis, you should be fine. (You can, of course, map Latitude to Display.Latitude and Longitude to Display.Longitude, in which case you get a spherical-type projection, instead of the rectilinear one.) Here's a simple example that I cobbled together from one of the examples: import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; import java.io.IOException; import java.rmi.RemoteException; import visad.*; import visad.util.*; import visad.data.mcidas.*; import visad.java3d.*; import visad.bom.*; public class SimpleMap { public static void main (String[] args) throws VisADException, RemoteException, IOException { // construct a 3-D display DisplayImpl display = new DisplayImplJ3D("display"); // define display coordinates display.addMap(new ScalarMap(RealType.Latitude, Display.YAxis)); display.addMap(new ScalarMap(RealType.Longitude, Display.XAxis)); // read McIDAS map file BaseMapAdapter baseMapAdapter = new BaseMapAdapter("../data/mcidas/OUTLUSAM"); Data map = baseMapAdapter.getData(); // link map to display DataReference maplinesRef = new DataReferenceImpl("MapLines"); maplinesRef.setData(map); display.addReference(maplinesRef); // create frame (window) on screen JFrame frame = new JFrame("Basemap Display"); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); // add 3-D display to panel in frame JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); panel.add(display.getComponent()); // finish off frame frame.getContentPane().add(panel); frame.setSize(500, 700); frame.setVisible(true); // and now exit - leaving display, color widget, // map and image to take care of themselves } } Jacky Saint wrote: > > Hi, > I would like to solve the problem of combining a map onto my contour 2D/3D > contour graph. I understand that VisAD has this type of capability with the > file extension *.OUTL or *.area . However I do not know how to show this on > the xy axis (longitude, longitude). For each point on the map it should have > a specific longitude/latidude value. So does the *.OUTL files automatically > generate the coordinates for longitude and latitude? Or put another way, > when I import a OUTL map does this generate the values for > longitude/latitude? Once again I will appreciate any feedback. > > Thanks (especially to whom helped me last time round ;) ) > Jacky > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- Tom Whittaker (tomw@xxxxxxxxxxxxx) University of Wisconsin-Madison Space Science and Engineering Center Phone/VoiceMail: 608/262-2759 Fax: 608/262-5974
visad
archives: