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: How do I fill in colours over land areas?

Hi John,

> I used Gridded2DSet to draw a map coastline on the display.  This worked 
> fine. How do you now fill the inner region with a colour? I will appreciate 
> if you can provide a little code.

This method in visad/DelaunayCustom.java:

    public static Irregular2DSet fill(Gridded2DSet set)

will return an Irregular2DSet for the interior of the region
surrounded by set, assuming it is a Gridded2DSet with manifold
dimension = 1 that does not self-interset. Note 'fill' connects
the first and last points of set to make a closed boundary.

Then link the Irregular2DSet to your Display, passing an array of
ConstantMaps to addReference() to define the color.

Good luck,
Bill


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