Dear All :
I had change my email , My question is the value of Latitude
OUTLSUPW
out range.
The links of images I had update.
ex1.jpeg :
ftp://ftp.ssec.wisc.edu/pub/incoming/ex1.JPG
ex2.jpeg :
ftp://ftp.ssec.wisc.edu/pub/incoming/ex2.JPG
ex3.jpeg :
ftp://ftp.ssec.wisc.edu/pub/incoming/ex3.JPG
ex4.jpeg :
ftp://ftp.ssec.wisc.edu/pub/incoming/ex4.JPG
OUTLSUPW :
ftp://ftp.ssec.wisc.edu/pub/incoming/OUTLSUPW
Thanks a lot!!
Monica
> Monica:
>
> Sorry I did not get your previous email -- I suspect it was put into
> my "junk" email because the return address had "???" in it.
>
> I cannot view your images with the links in your email. Please ftp
> them
to:
> ftp.ssec.wisc.edu and put them into the "pub/incoming" directory and
> let me know the filenames (they will only stay there for 48 hours,
> though).
>
> Thanks.
>
> tom
>
Dear all :
Before I mail the lat and lon range question, but no one answer
me...
so I decide to describe clear...
The OUTLSUPW file is earth map, and I just use the piece of it to
match my data.(my data range : -110 ~ 57.5 and -32.5 ~ 55.0)
so, the lon : 0 ~ 360 --> lon : -110.0 ~ 57.5
the lat : -90 ~ 90 --> lat : -32.5 ~ 55.0
way 1 : use Display.SelectRange
ScalarMap lonRangeMap = new ScalarMap(RealType.Longitude,
Display.SelectRange);
display.addMap(lonRangeMap);
RangeControl lonRangeControl = (RangeControl)
lonRangeMap.getControl();
ScalarMap latRangeMap = new
ScalarMap(RealType.Latitude,Display.SelectRange);
display.addMap(latRangeMap);
RangeControl latRangeControl = (RangeControl)
latRangeMap.getControl();
//Longitude has two coordinate : -180 ~ 180 or 0 ~ 360
if (lonRange[0] < -180 || lonRange[0] > 180 || lonRange[1] <
-180 || lonRange[1] > 180)
lonRangeControl.setRange(new double[]{lonRange[0] - 0 +
(-180), lonRange[1] - 0 + (-180)});
else
lonRangeControl.setRange(lonRange);
latRangeControl.setRange(latRange);
I use it can get perfect ficture.(my data range : -110 ~ 57.5 and
-32.5 ~ 55.0)
But I set lonRangeControl and latRangeControl, my data range also
change.(my data range : 0 ~ 360 and -90 ~ 90)
ex4.jpeg :
ftp://ftp.ssec.wisc.edu/pub/incoming/ex4.JPG
way2 : use BaseMapAdapter.setLatLonLimits()
baseMapAdapter.setLatLonLimits((float)latRange[0],
(float)latRange[1], (float)lonRange[0], (float)lonRange[1]);
(my data range : -110 ~ 57.5 and -32.5 ~ 55.0) and (my data range
:
0 ~ 360 and -90 ~ 90) lon and data range is correct.
But lat Max and lat min will out off the range.
ex2.jpeg :
ftp://ftp.ssec.wisc.edu/pub/incoming/ex2.JPG
Is the visad error ? Or I follow error steps?
Is there any another better resolve way?
Thanks a lot...
By Monica
Hello~
I use those code which about visad, and open file "OUTLSUPW" (Earth map)
But I just get a little zone.(lonRange -110.0 --> 57.5
latRange -32.5 -->
55.0)
//same as ftp://ftp.ssec.wisc.edu/pub/incoming/OUTLSUPW
BaseMapAdapter baseMapAdapter = new BaseMapAdapter(new
URL("http://iiiserver:81/monica/data/OUTLSUPW"));
double lonRange[] = {-110.0, 57.5};
double latRange[] = {-32.5, 55.0};
DataReference maplinesRef = new DataReferenceImpl("MapLines");
maplinesRef.setData(baseMapAdapter.getData());
And I get ex1.jpeg :
ex1.jpeg : ftp://ftp.ssec.wisc.edu/pub/incoming/ex1.JPG
I read the visad.doc and add this code ...
double lonRange[] = {-110.0, 57.5};
double latRange[] = {-32.5, 55.0};
DataReference maplinesRef = new DataReferenceImpl("MapLines");
baseMapAdapter.setLatLonLimits((float)latRange[0], (float)latRange[1],
(float)lonRange[0], (float)lonRange[1]); // add Limit
maplinesRef.setData(baseMapAdapter.getData());
And I get ex2.jpeg
ex2.jpeg : ftp://ftp.ssec.wisc.edu/pub/incoming/ex2.JPG
But ex2.jpeg is not I want, I want the consequence like ex3.jpeg :
ex3.jpeg : ftp://ftp.ssec.wisc.edu/pub/incoming/ex3.JPG
I have thought use RangeControl ...
ScalarMap lonRangeMap = new
ScalarMap(RealType.Longitude,Display.SelectRange);
display.addMap(lonRangeMap);
RangeControl lonRangeControl = (RangeControl) lonRangeMap.getControl();
latRangeMap = new ScalarMap(RealType.Latitude,Display.SelectRange);
display.addMap(latRangeMap);
RangeControl latRangeControl = (RangeControl) latRangeMap.getControl();
lonRangeControl.setRange ( lonRange);
latRangeControl.setRange ( latRange);
in this case I can get the consequence like ex3.jpeg, but when I get
(lonRange > 180 or lonRange < -180),
the view of OUTLSUPW will not show lonRange > 180 or lonRange < -180 and
the range not symmetry....
Could you tell me how to solve this problem? or give me a direction to
find
answer...
(I use visad_src-2.0.jar)
Thank you very much~ :)
By monica