[Thread Prev][Thread Next][Index]

Re: axis values



John,

Lot's of detail coming with a suggestion at the end.

Although you are trying to use the axis definitions in the xml files to describe the actual, honest-to-goodness, defined in the data file regions of valid data, this was not what they were originally intended for. Instead, their use is supposed to allow a user interface to locate the data somewhere on the globe and allow a user to select within the region of valid data. Data files typically define axes that go from -180:180 or 0:360 but there are also others that don't have longitude axes and just index space. The latter require you to lie about the axis definitions in the .xml configuration file.

The applet takes all comers and tries to present them intelligibly. No matter what the axis definition, the region of valid data will show up in the right place on the map. Parameters to the applet tell it what the image domain is for the underlying applet map and what the valid data range should be. If you 'view source' on the Constraints page you'll see near the bottom:

<APPLET CODEBASE="../classes/"
ARCHIVE="LiveMap_30.jar"
CODE="LiveMap_30.class"
NAME="map" MAYSCRIPT WIDTH=525 HEIGHT=160>
<PARAM NAME=base_image VALUE="../servlets/livemap_image?1">
<PARAM NAME=toolType VALUE="XY">
<PARAM NAME=img_x_domain VALUE="-180 180">
<PARAM NAME=img_y_domain VALUE="-90 90">
<PARAM NAME=tool_x_range VALUE="-180 180">
<PARAM NAME=tool_y_range VALUE="-90 90">
<PARAM NAME=debug VALUE="true">
</APPLET>

The applet has code to map data defined on one range onto the range defined in these parameters. It's been a while since the applet code was last touched (>4 years) so I'm not sure of the specifics but I am certain that the region sent in by the applet can be MOD(#,360) of the region information contained in the .xml configuration file. The 180:540 shift probably relates to attempts long ago to avoid sending negative longitudes into Ferret. Any problems associated with this have been fixed in Ferret but, as I said, the applet code is pretty old.

For your purposes, you'll need to use the values that are defined in the configuration file to define the honest-to-goodness data file axis, shift the incoming region to match and then convert to index space.

I see now that there is still a fixLongitude subroutine in Ferret.pl that is used in two places and tries to make sure that all longitudes are positive. (I've just added a Bugzilla entry to remove this.) This should be no longer necessary and you may comment out the lines that use it. Perhaps that will improve things.

But my point earlier about having to shift the incoming longitudes onto the domain of the honest-to-goodness axis are still valid.


-- Jon


John C Cartwright wrote:

Hello All,

I'm suffering from a bit of confusion regarding the axis values in the configuration file.

In looking at the coads data provided with LAS, the grid x axis is defined as:

<coads_climatology_cdf_COADSX type="x" units="degrees_east">
<arange start="21" step="2" size="180"/>
</coads_climatology_cdf_COADSX>


The LAS user interface presents the X range as 180W -> 180E, but the ferret property is sent as:

ferret prop: x_lo = 180
ferret prop: x_hi = 540

Can someone clarify for me or am I simply mis-reading this?

Also, what is the difference between the ferret properties of "x_hi" and "refmap_xhi"?

Thanks!


-- john

=====================================================
John Cartwright
Associate Scientist
Geospatial Data Services Group
CIRES, National Geophysical Data Center/NOAA
(303) 497-6284
John.C.Cartwright@noaa.gov
=====================================================




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement