> 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 Rivers.java
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
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.