grass: grid saved as raster. 2

Thanks for your answer. v.mkgrid works fine but v.to.rast produces a
raster
with all cells equal to 0.
Any idea of why?
Agus

Because MY answer was wrong. v.mkgrid works, but it does not define polygon
areas. However, this approach may be salvagable if you have some skill with
shell scripts (or better yet, perl).

Without getting into the details, you can take the output of v.mkgrid and
convert it to GRASS ASCII vector format. The programmer's manual gives a
thorough description of this simple format. What is needed now is to convert
the line descriptions into a series of site descriptions. This can be done
by merging the information you have regarding EW and NS resolution with the
line coordinates data. Most of these lines (better here to say "arcs") are
defined by two points, or coordinate pairs. If you interpolate a series of sites
between each pair of coordinate pairs, the resulting lists can then be
processed using the s.menu option to convert sites to raster, or by using the
contributed (SCS?) s.to.rast command.

As long as the described arcs are
absolutely horizontal or vertical, this is a relatively simple problem. But,
alas, programming is required.

I wish I hadn't made it sound so simple the first time around.

Greg Koerper (greg@towhee.cor2.epa.gov) writes on 23 Aug 93:

Because MY answer was wrong. v.mkgrid works, but it does not define polygon
areas. However, this approach may be salvagable if you have some skill with
shell scripts (or better yet, perl).

does v.to.rast work with labelled *lines*? If not, then I suppose
that it should. If it does, then what about using v.digit to
"Bulk" label all lines as a particular category and then do
the conversion? This would necessitate a cycle through v.out.ascii/v.in.ascii
because v.mkgrid makes the grid lines area edges instead of lines.

--Darrell