Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

display side coord systems and aspect ratios

Using examples/MapProjectionDisplay as a (very useful!) starting point, I
have finally learnt how to do display side coord systems.  Now I can plot
a grid of data and its projection (and thus basemaps, grid lines) on a
display.  But...

if I change the aspect ratio, which I did to show that my grid of model
data is rectangular rather than square, then my display is not right. For
example, the method used in the examples/MapProjectionDisplay to track the
lat/lon, ie, finding the 'ray' from Swing's pixel coords, fails if a
non-square aspect ratio is in place (at least I think it is failing?)

Furthermore (related?), if I alter the aspect ratio, my 'grid' of data
still fits in the box (my grid is defined by the 'getDefaultMapArea' of
the MapProjection), but the box now contains more/less of the background
map, which is the OUTLUSAM file and is thus lat/lon.

PS: is there another way to locate the display values (ie the -1 -> 1 for
Display.XAxis, Display.YAxis) given the mouse coords?  I note that the
mouse drag with middle button down produces on the canvas the values for
all scalar mapped types.  Is this using the find ray method?

Any help appreciated.

Stuart


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690