The Hashtable I was referring to is the labelTable variable in Julien's
code in the updateLonScale method. You calculate the Easting/Northing
values at each X/Y point using some method like Julien does and store
the results in a Hashtable which gets used in the AxisScale.setLabelTable.
On 3/23/12 10:37 AM, Julien Chastang wrote:
Stefan et al.,
It is an interesting problem that I ended up solving numerically
(similar to Newton's method for solving roots of an equation). I do not
use a hashtable.
Actually, looking at that code makes me realize I have to refactor it.
The conditional logic therein is kludgy and unecesssary, but you get the
Note the solution does not always converge (around the poles) and this
you need an "escape hatch".
There may be a better way of doing all of this. If so, I am open to your
On 3/23/12 7:13 AM, Don Murray wrote:
On 3/23/12 2:08 AM, Stefan Below wrote:
i am using the MapProjectionDisplay for playing around with Display side
CoordinateSystem. Everything is working fine, except that i have no idea
how i can display the coordinates of the (UTM) CoordinasSystem on the
X/Y axis. Is it somehow possible to add a mapping between the
Display.Latitude/Longitude and Display.XAxis/Yxis? (p.e.
(Latitude,Longitude) -> (Northing,Easting))
Julien Chastang of the IDV group is working on this now for the IDV.
There is no simple way, especially when the projection is not
rectillinear. Basically, you would have to compute the UTM values at
lat/lon points along the x and y axes and then use a custom Hashtable
for a mapping of X/Y value to Easting/Northing.
You might try adding a data reference with just a GriddedSet of the
Northing/Easting values and then map Easting to Display.XAxis and
Northing to Display.YAxis. I'm not sure it would work if you had the
set with a CoordinateSystem of (Latitude,Longitude) -> (Northing,
Easting) but if that's easier, you could give that a try.
visad mailing list
For list information, to unsubscribe, visit:
NOAA/ESRL/PSD and CIRES