UnionSet Question


I have a program that simply displays contours in 2 dimensions across a
lat and lon grid. I am using LinearLatLonSet as my domain and then just
setting my FlatField values accordingly...

FunctionType func = new FunctionType(dom_tup, variable);

LinearLatLonSet domain_set = new LinearLatLonSet(...);

float[][] flat_samples = <function call to get my samples>

FlatField vals_ff = new FlatField(func, domain_set);
vals_ff.setSamples(flat_samples, false);

And everything works fine.

I also have a program that uses a ShapefileAdapter to open a shapefile
and gives me a UnionSet. I can give a Rectangle2D object in the
constructor so that the UnionSet it returns is covering the same area as
my previous program.  This program works fine too.

What I want to do is combine them so the contours overlay the shapefile,
and I have been struggling trying to figure out how to go about doing
this. I see that the UnionSet from the shapefile is made up of 3
SampledSets and then each one of those is made up of some Gridded2DSets.

So I am wondering if anyone can give me a pointer on how to going about
combining my first and second programs?