Re: Gridded2DSet of Lat/Lon

Hi Leah,

The algorithm requires that each box of the grid be convex, and
that the direction of the samples (clockwise vs counterclockwise)
be consistent.  It checks this by comparing "signatures" between
grid boxes. The Lambert conformal conic projection should form a
valid grid, except where the grid converges on a single point at
the top.

Because the algorithm will most likely fail if you have colocated
samples, I recommend spacing the topmost samples of the
projection a very small distance apart from one another, in such
a way that the validity of the grid is maintained.

-Curtis

At 10:00 AM 3/14/2003, Leah Foechterle wrote:
>I'm trying to create a Gridded2DSet of Lat and Lon values
>but the constructor throws an Exception: "samples do not
>form a valid grid".  I'm using the following constructor...
>
>public Gridded2DSet( MathType type, float[][] samples, int lengthX, 
>int lengthY)
>
>My Lat/Lon values are on a Lambert Conformal grid projection, 
>but I haven't defined the Coordinate System because I didn't
>think it was necesssary (and it seems complicated -- there are
>alot of parameters associated with a Lambert Conformal projection).
>
>My float[][] samples are loaded from files such that 
>samples[0][] = latitudes and samples[1][] = longitudes (reversing
>these doesn't avoid the exception).
>
>I've looked at the Gridded2DSet code to try to figure out why my
>"samples do not form a valid grid" but I don't understand the 
>algorithm that determines this.
>
>Has anyone else had this problem or could someone explain to me
>the algorithm that says my grid is not be valid?
>
>
>Leah