Re: curvilinear grid to Set

Hi Jan-Rolf,

I assume you mean dummy values for grid locations.

I can think of two approaches to this:

1. Set the dummy grid locations to Float.NaN (i.e., missing)
and use the Gridded2DSet constructor signature:

  public Gridded2DSet(MathType type, float[][] samples, int lengthX,
           int lengthY, CoordinateSystem coord_sys, Unit[] units,
           ErrorEstimate[] errors, boolean copy, boolean test)

with test = false. This will tell the constructor not to
test for missing (i.e., NaN) locations, and not to test for
topology consistency among locations. Some operations with
such a set will fail (throw an Exception, or fail in some
more silent manner), including possibly some operations
necessary for visualizing the data. But its worth a try,
since if it works in your case, it'll be the easy approach.

2. Construct an Irregular2DSet from only the non-missing
locations. You can either use an Irregular2DSet constructor
without a Delaunay argument and let it invoke a Delaunay
algorithm to derive a tology for your non-missing points, or
you can pass it a DelaunayCustom that you construct to define
the topology among the non-missing points. For this, you might
break each intact grid box (i.e., all four corners are
non-missing) into two triangles, express each grid box with
three non-missing corners as one triangle, and eliminate all
grid locations that are not part of at least one triangle.

Good luck,
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

On Tue, 15 Apr 2003, Hendriks, Jan-Rolf (HMC) wrote:

> I am trying to produce a Set corresponding to my curvilinear grid. The
> problem is: my curvilinear grid (dimensions m x n) contains dummy values for
> some m,n points (where m and n are just index values for the grid).
>
>
> for example:
>
>   X--X--X
>    \   \
>     X--X
>      \   \
>       X--X
>
> where the curvilinear grid contains a m x n (3 x 3) grid, the 2 missing
> corresponding x,y value-pairs do have some dummy value.
>
> Is it possible to use a Gridded2DSet or some work around ?
>
> Best Regards,
>
> Jan-Rolf Hendriks
>
>
> Disclaimer
> ************************************************************************
> Aan dit bericht kunnen geen rechten worden ontleend.
> Dit bericht is uitsluitend bestemd voor de geadresseerde.
> Als u dit bericht per abuis hebt ontvangen, wordt u verzocht het te
> vernietigen en de afzender te informeren.
> Wij adviseren u om bij twijfel over de juistheid of de volledigheid van
> de mail contact met afzender op te nemen.
> ************************************************************************
>
>
>


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