Re: Null values in Linear2DSet?

Hi Andrew,

> I am working with elevation data that can be very nicely held
> in a Linear2DSet, except that sometimes a few of the values
> are missing around the edges so that the rectangular area is
> not completely filled.
> What is the best way of handling this? Can I set a null
> value? Or do I have to go to am Irregular2DSet? What would be
> the performance penalty of doing so?
> Sorry, I did have a look through the email archives and test
> examples but could not find an answer.

You can construct a FlatField with a Linear2DSet for its
domain, and use Float.NaN for the missing values in the
array you pass to its:

  public void setSamples(float[][] range)

In your display the missing values will be invisible, or
just black in the case of texture mapping.