NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: Gridded2DSet of Lat/Lon

Ok.  I've figured out my problem.  Some of my longitudes were 
positive values where most of my longitudes were negative values
(I was wrapping around the N. Pacific).  I noticed this when I
tried plotting with an Irregular2DSet.  

So, if I modify my longitude values (lon -= 360 for lon > 0)
my lat/lon points do form a valid grid.

Great!  I can have a relaxing weekend now that I've gotten this
figured out.

:)

Leah


**************************
Leah Foechterle Heiss
Engineer III
Applied Physics Laboratory
University of Washington
Seattle, WA
**************************


On Fri, 14 Mar 2003, Curtis Rueden wrote:

> 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
> 


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