RE: GRIBCoordinateSystem

The Ni value is the number of points along a latitude -- that is, the
number of points in the east-west direction.  If you want a 1 degree
lat/long grid, then you probably want something like:

360,180,-90,-180,90,180,1,1

This is a very confusing constructor, since it seems over-specified.  In
reality, the values of La2 and Lo2 are not used.

Don- we might think about adding a more straight-forward signature for
this...?

tom


On Wed, 5 Jun 2002, Luke A. Catania (TEC) wrote:

> I realized an error I made and changed:
>
>
> CoordinateSystem
>         coordinateSystem
>             new MapProjectionAdapter(new GRIBCoordinateSystem(0,
>               180, 360, -90, -180, 90, 180, 15, 15));
>
>
> To:
>
> CoordinateSystem
>         coordinateSystem
>             new MapProjectionAdapter(new GRIBCoordinateSystem(0,
>               180, 360, -90, -180, 90, 180, 1, 1));
>
> but now it is half the height of the display box and twice the width.
>
>
> -----Original Message-----
> From: owner-visad-list@xxxxxxxxxxxxx
> [mailto:owner-visad-list@xxxxxxxxxxxxx]On Behalf Of Luke A. Catania (TEC)
> Sent: Tuesday, June 04, 2002 8:35 PM
> To: Don Murray; Luke A. Catania (TEC)
> Cc: Bill Hibbard; visad-list@xxxxxxxxxxxxx
> Subject: GRIBCoordinateSystem
>
> I am using the code MapProjectionDisplay Trying to create a Mercator or
> Rectangular projection.  I think that is what this constructor does.  I
> tried using:
>
> CoordinateSystem
>         coordinateSystem
>             new MapProjectionAdapter(new GRIBCoordinateSystem(0,
>               180, 360, -90, -180, 90, 180, 15, 15));
>
> But not sure if I am using the GRIBCoordinateSystem class correctly.  The
> help for this shows a second set of lat lons, but does not say what they
> are.  I assume they are the last grid point since the la1 and lo1 are the
> first.
>
> When my display comes up, the map is scrunched really small in the lower
> left of the display box.
>
> GRIBCoordinateSystem
> public GRIBCoordinateSystem(int gridTypeCode,
>                             int Ni,
>                             int Nj,
>                             double La1,
>                             double Lo1,
>                             double La2,
>                             double Lo2,
>                             double Di,
>                             double Dj)
>                      throws VisADException
> Constructor for a latitude-longitude (GRIB type code = 0) with
> RealTupleType.LatitudeLongitudeTuple as a reference.
> Parameters:
> Ni - number of points along a latitude circle
> Nj - number of points along a longitude circle
> La1 - latitude of first grid point (degrees)
> Lo1 - longitude of first grid point (degrees)
> Di - longitudinal direction increment (degrees)
> Dj - latitudinal direction increment (degrees)
> Throws:
> VisADException - couldn't create the necessary VisAD object
>
>
> -----Original Message-----
> From: Don Murray [mailto:dmurray@xxxxxxxxxxxxxxxx]
> Sent: Friday, May 24, 2002 10:23 AM
> To: Luke A. Catania (TEC)
> Cc: Bill Hibbard; visad-list@xxxxxxxxxxxxx
> Subject: Re: MetApps ShapefileAdapter
>
> Luke-
>
> "Luke A. Catania (TEC)" wrote:
> >
> > Is there a way to use a map projection with VisAD?   If so  there example
> > code?? After using the DisplayImplJ3D, I was able to get the map of the
> > world shape file displayed, but it does not look correct because of the
> lack
> > of a map projection.
>
> As Bill mentioned, we use a Display side CS in MetApps.
> See ucar.unidata.view.geoloc.MapProjectionDisplay.  This
> will take either a visad.georef.MapProjection or a
> ucar.unidata.geoloc.Projection as input to set the background
> projection.  For a version of MapProjectionDisplay that
> uses vanilla VisAD (i.e. no Unidata classes), see:
>
> ftp://ftp.unidata.ucar.edu/pub/dmurray/MapProjectionDisplay.java
>
> This does not allow you to change projections, though whereas
> ucar.unidata.view.geoloc.MapProjectionDisplay does allow changes
> by creating a new DisplayRealTupleType with each change.
>
> 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
> *************************************************************
>
>

--
Tom Whittaker
University of Wisconsin-Madison
Space Science and Engineering Center
Cooperative Institute for Meteorological Satellite Studies
Telephone/VoiceMail:  608.262.2759