Re: resampling/combining lat/lon or lon/lat grids.

Hi Don,

Don Murray wrote:

Hi-

We are looking at ways to handle GeoTIFF and other navigable
imagery in our IDV application.  For any image, of the
form:

(ImageElement, ImageLine) -> (Red, Green, Blue)

it is pretty easy to replace the domain with a new one
that either has a CoordinateSystem transform to
(Latitude, Longitude) is just a Linear2DSet that defines
the box (if the image is on a retangular grid).  We can
then display it in a display with ScalarMaps of
Longitude->XAxis, Latitude->YAxis, Red->Red, Green->Green,
Blue->Blue.

However, we would like to drape such an image over some
topography.  To do this, we usually combine the two grids
so that the range would be a Tuple like

((Red, Green, Blue), (Z))

and add a ScalarMap of Z->ZAxis.

However, for any given topo dataset, the data might have a
domain or CS reference of (Longitude, Latitude) or
(Latitude, Longitude). Using the FieldImpl.combine function, the
resampling fails if the  image domain or CS reference has
(Longitude, Latitude) and the topo data is (Latitude, Longitude).

Does anyone else run into this or has anyone got a good solution

You don't want to make a new topo FlatField with the same Earth
tuple for the domain as that of the image?  With getSamples(false) and
getValues(false), you wouldn't  use much more memory.

TomR


for this?

Thanks.

Don
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
"There's someone in my head, but it's not me"    Roger Waters
*************************************************************