Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

UnionSet Question

Hi,

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?

Thanks,
Ben



 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690