Re: 2d grid cells over an aerial map

Hi Sitt,

> Anybody knows how to draw 2d grid cells over an aerial map? My intention
> is to have grid cells to cover just a particular part of the map and
> leave the rest of the map still visible, while the grid cells must be able
> to display in different colors. I've been struggling for quite a while.

If you want to draw grid oputlines try creating a FlatField with
MathType ((x, y) -> (r, g, bi, z)) where you create the domain Set as
a  Gridded2DSet with manifold dimension = 1. See the the
program in visad/examples for an example. Map r, g and b to Red,
Green and Blue (with appropriate calls to the setRange() method
of the ScalarMaps), and z to ZAxis to determine the height of the
grid outlines.

If you want to draw filled grid boxes to obscure, then you might
try a FieldImpl with MathType:

  (index -> (r, g, b, z, Set(x, y)))

Each Set data object of Type Set(x, y) would be a Gridded2DSet
with manifold dimension = 2 and a 2 x 2 grid (just 4 corners).
The domain Set for (index -> ... would just be an Integer1DSet
for the number of filled grid squares you need.


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