CoordinateSystem 2D/3D

Hi
I'm writing an application which has to display ,to simplify,
for (longitude,latitude)->temperature(color).I want y axis to be
displayed in multiply ways(different coordinate systems -eg.logarithm
yaxis meybe in other)
I wrote something using an example from one of previous posts,but
that doesn't work(that was for one argument function x->y)
(link to this post: http://www.unidata.ucar.edu/support/help/
MailArchives/visad-list/msg05891.html)
"My" code:

latitude = RealType.getRealType("latitude");
longitude = RealType.getRealType("longitude");   
loglatitude=RealType.getRealType("loglatitude",CommonUnit.promiscuous);

RealTupleType reference = new RealTupleType(loglatitude);
CoordinateSystem logCS = new MyCoordinateSystem(new
RealTupleType(latitude,longitude));

domain_tuple = new RealTupleType(latitude, longitude,logCS,null);
temperature = RealType.getRealType("temperature");
func_dom_temp = new FunctionType( domain_tuple, temperature);
int NCOLS = 5;
int NROWS = 6;

domain_set = new Linear2DSet(domain_tuple, 0.0, 5.0, NROWS,
      0.0, 5.0, NCOLS);

    float[][] temp_vals = new float[][]{{1, 6, 12, 18, 24},
    {1, 7, 12, 19, 25},
{2, 8, 14, 20, 26},
{3, 9, 15, 21, 27},
{4, 10, 16, 22, 28},
{5, 11, 17, 23, 29}  };

float[][] flat_samples = new float[1][NCOLS * NROWS];
vals_ff = new FlatField( func_dom_temp, domain_set);
vals_ff.setSamples( flat_samples,false );
display = new DisplayImplJ2D("display1");
latMap = new ScalarMap( loglatitude, Display.YAxis );
lonMap = new ScalarMap( longitude, Display.XAxis );
tempMap = new ScalarMap( temperature,  Display.Red );
display.addMap( latMap );
display.addMap( lonMap );
display.addMap( tempMap );
data_ref = new DataReferenceImpl("data_ref");
data_ref.setData( vals_ff );
display.addReference( data_ref );
..
the code of MyCoordinateSystem for now is just a copy of
LogCoordionateSystem (do I right think that to have different
coordinate system I should only change toReference and fromReference?)
full code: http://infobot.pl/~romano/visad/
|---------------------
Now when I run that code i get an error:
Single DisplayRealType DisplayXAxis occurs more than once:
ShadowType.testIndices

What i do wrong?What should I do to make it work?
Thanks for replay
Roman

p.s.
I quite newbie in visad(i read tutorial,part of developers
guide,posts) so meybe I done something stupid..
Sorry also for my english(mistakes).. 

----------------------------------------------------
Cathy Kelly - "Przyjaciółki od serca". Ciepła i wzruszająca 
historia o czterech kobietach, które w obliczu nieszczęścia 
na nowo odkrywają sens życia i wartość łączącej je przyjaźni. 
Zobacz! 
http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fprzyjaciolki.html&sid=1239


==============================================================================
To unsubscribe visad, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================


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