Re: number of grid points, GRIBs and MapProjectionDisplay

Hi Stuart:

The terminology used in GRIBCoordinateSystem is consistent with that used in the GRIB Edition 1 (FM 92) manual.

Nx - Number of points along x-axis
Ny - Number of points along y-axis

The defaultMapArea() method returns a Rectangle2D, and the constructor for the Rectangle2D.Double is defined as:

public Rectangle2D.Double(double x, double y, double w, double h)

Constructs and initializes a Rectangle2D from the specified double coordinates.

    w - the width of the newly constructed Rectangle2D
    h - the height of the newly constructed Rectangle2D

Thus Nx and Ny are used for the "width" and "height" of the Rectangle2D.
Hope this clarifies things for you.

Best wishes,


Stuart Maclean wrote:

Something is puzzling me re the visad.jmet.GRIBCoordinateSystem and the
MapProjectionDisplay example for display side coord systems...

Do Ni and Nj, in constructor params in the GRIB class, represent the
number of grid _points_ or the number of grid point _intervals_ ?? It
suggests the number of grid points, given the comments in the source code.

But if this is true, and it is the number of points and not intervals,
then would the range, and hence the defaultMapArea(), be 1,1,Ni,Nj and not

Otherwise the MapProjectionDisplay's adapter class, which maps lat/lons to
the display range -1 to 1, will be mapping row 0 to -1 and row Ni to 1.
Using this logic, the axis accommodates Ni + 1 grid points?

I'm sure there's an easy explanation, I just can't find it ;)


Tom Whittaker (tomw@xxxxxxxxxxxxx)
University of Wisconsin-Madison
Space Science and Engineering Center
Cooperative Institute for Meteorological Satellite Studies
Phone/VoiceMail: 608.262.2759

  • 2005 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: