newbie question


I'd really appreciate some help with my lack of understanding of the
visad model. I'm trying to display the postions (lat, long, alt) of some
weather stations as a learning exercise.

I'm getting the error
"RealType Longitude occurs more than once: ShadowType.testIndices"
when the Java 3D viewer comes up, and nothing else.

I assume that my logic is at fault (it was a strain just getting it to

{If I get this to work I next want to show the period of operation
(span) of the stations as a bar in the Z axis, rather than station

Here is the relevant bit of code I think:
RealTupleType stationSpan = new RealTupleType(RealType.Latitude,
RealType.Longitude, RealType.Altitude);

int nstations=testquery.stations.size(); // the number of stations to

float span[][]=new float[3][nstations];

for (int i=0;i<nstations;i++){
        WeatherStation current=(WeatherStation)

        span[0][i]=(float) current.latitude;
        span[1][i]=(float) current.longitude;
        span[2][i]=(float) current.altitude;


final DataReference stations_ref = new DataReferenceImpl("stations");

stations_ref.setData(new Gridded3DSet(stationSpan,span,nstations));

DisplayImpl display = new DisplayImplJ3D("image display");

// map earth coordinates to display coordinates

display.addMap(new ScalarMap(RealType.Latitude, Display.XAxis));
display.addMap(new ScalarMap(RealType.Longitude, Display.YAxis));
display.addMap(new ScalarMap(RealType.Altitude, Display.ZAxis));

Thanks for any advice
Matthew Laurenson
National Agriculture Research Center
Ministry of Agriculture, Forestry and Fisheries
3-1-1 Kannondai
Ibaraki 305-8666

ph       +81-298-38-7025
fax      +81-298-38-8551

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