[GRASS5] raster inaccuracy

Roger Miller roger at spinn.net
Tue Nov 9 17:31:38 EST 2004


I use Grass in part to support finite difference ground water models.  There
is a substantial inaccuracy in Grass' raster representation that I've known of
for some time.    The problem surfaced again recently, caused errors in my
reported results and required me to repeat several hours of work at
substantial costs.  I think this problem has been present from early betas of
5.0 through 5.3 (our current installation).

The png file at


illustrates the problem.  The image was produced by the Grass PNG driver.  It
shows the top left corner of a model grid.  The lines are a vector map that
outlines the individual model cells.  The colored blocks are a raster map
developed from the vector map using v.to.rast.  The raster cells are not
illustrated at the same locations as the cells of the vector map.

The cells in this map are a mile across and the resolution of the region is
set to one mile.  The actual size of the mismatch varies according to the
location of the map origin, but even with the origin set exactly at the corner
of the grid (where normally it is set) the raster cells do not correspond to
the cells in the vector map.  The size of the mismatch is reduced by
increasing the resolution of the region.  The difference is negligible if the
row and column dimension of the region are reduced to a small fraction of the
cell width - 1% worked well in this case, but such detailed resolutions are
often not practical and shouldn't be necessary.

The problem is not limited to the quality of the illustration.  My worst
problem arose when the raster file was queried with d.what.rast.  The
row-column location and category value produced by d.what.rast are the
location and value of the raster cell as illustrated at a location, not the
actual row-column location and category value at the location queried.

I mapped a sites layer illustrating well locations over the raster map then
queried the raster map to identify the row and column location for several
wells.  I entered those wells into the ground water model based on the results
of the query.  The wells were sometimes located in the correct model cell, but
in other cases were assigned to one of the 8 surrounding model cells.

I can only ask.  *Please* get this problem fixed.  Grass is a powerful tool,
but this inaccuracy makes it very difficult for me to use Grass in my work.

Roger Miller
Lee Wilson and Associates

More information about the grass-dev mailing list