Re: how to fill in pixels

Lak,

> Thanks for your reply. I was not too clear on the
> manifold dimension vs. domain dimension,
> but I went back and read the Developer's guide
> and now it all makes sense.  Using manifold dimension
> of 2 in the Gridded3D constructor fixes the problem.

Good.

> Also, I am not clear on how this solution works:
> 
> > If you want the elevation to be part of your data, use the
> > MathType:
> >
> >   (elevation, ((radial,gate)->(x,y,z,gatevalue)))
> >
> > This is a Tuple combining a Real elevation with your
> > original FlatField. Then include ScalarMaps
> > radial->Longitude, gate->Radius and elevation->Latitude.
> 
> Is there something that you can point me to
> that explains this? Specifically, I don't understand why
> gate is radius and elevation is latitude other than
> that the units and ranges match ...
> Ideally, I would like to use this solution, because then
> I don't really have to compute x,y and z ...

Display.Longitude, Display.Radius and Display.Latitude form
VisAD's display spherical coordinate system. Since your
radar gate, radial and elevation also form a spherical
coordinate system, I suggested the mapping as an easy (but
oversimplified) way to display your data.

> Also, since these are not really longitude and latitude,
> will I be able to overlay another cone (at
> a different location on the earth) and still have things
> work correctly?  The x,y,z solution works, because
> my x,y,z is in a co-ordinate system with the center
> of the earth as origin (not the apex of the cone).

It is a simplifying hack to directly map radar coordinates
to display spherical coordinates. Hence VisAD includes the
visad/bom/Radar3DCoordinateSystem.java class, which defines
the relation of a local radar spherical coordinate system
to the earth's spherical coordinate system. Its constructors
include arguments for specifying the radar location in earth
latitude, longitude and altitude, as well as the spherical
grid sampling of the radar. You can find an example of how to
use Radar3DCoordinateSystem.java in the visad/bom/RadarAdapter.java
class.

Because each instance of Radar3DCoordinateSystem you construct
can have a different location and grid sampling, you can define
the spatial relation among many radars by constructing many
Radar3DCoordinateSystems.

When you use Radar3DCoordinateSystem, you no longer construct
ScalarMaps from your radar gate, radial and elevation RealTypes.
Instead, you construct ScalarMaps from RealType.Latitude,
RealType.Longitude and RealType.Altitude (VisAD's intrinsic
earth spherical coordinates).

> > But use a Gridded3DSet with manfold dimension = 2.
> >   new Gridded3DSet( domainTuple, xyz, num_radials, num_gates )
> 
> this works, and I even understand why :)
> However, I still don't know how to turn off interpolation
> (i.e. do NEAREST_NEIGHBOR).

Unless you have called GraphicsModeControl.setTextureEnable(false),
any FlatField with manifold dimension = 2 should be displayed
using texture mapping, which should display radar pixels as
blocks rather than interpolating colors. Perhaps send us the
URL of an image that shows this problem.

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html