[GRASS5] raster inaccuracy

Roger Miller roger at spinn.net
Tue Nov 9 20:11:19 EST 2004


The model region is defined by the authors of the model.  The model origin is 
at a more-or-less arbitrary location and the boundaries are such that it 
divides equally into 188X256 rows and columns, each 5280 feet wide.

I'm not sure what the actual boundaries of the region were when I produced the 
illustration.  That region was set by zooming in on the corner then panning 
to the northwest to get a clear view of the corner.  The actual size of the 
mismatch varies with the location of the origin and with the resolution of 
the region.  I can make the raster representation accurate by going to very 
fine resolutions.  Otherwise, if there is any situation in which the raster 
map is accurate then it would probably -- as you suggest -- depend on a 
getting the right combination of origin, resolution and cell size.

The view in the X monitor is essentially identical to the illustration 
provided by the png monitor.

This is not a problem with importing data.  The vector representation of the 
model grid was constructed as a Grass ascii vector file.  Using d.where the 
grid looks correctly located and dimensioned.  The raster file in this case 
is not a model file.  The raster file was created directly off the vector 
representation of the grid using v.to.rast.  The raster file and the vector 
file represent the same data, but the raster representation is inaccurate, 
with the size of the inaccuracy varying with the region resolution and 

Roger Miller

On Tuesday 09 November 2004 16:45, you wrote:
> > 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
> >
> > http://members.spinn.net/~roger/mismatch.png
> is your region something like this:
> e=100025
> w=200075
> n=300025
> s=400075
> res=50
> or more to the point is your input data like the above and your region
> like:
> e=100000
> w=200000
> n=300000
> s=400000
> res=50
> ?
> as a test, do
> g.region res=25  # or res="some common denominator"
> and see if things start to line up in the XDRIVER.
> (the PNG driver is much less tested than XDRIVER, maybe other bugs..)
> I've had the same trouble with importing model data; setting the region
> resolution to half, or setting the bounds as the first example above
> (25-75) fixed it.. but you have to be careful it doesn't inadvertently
> switch back, also when you do overlays with maps which use a 0-50 bounds
> settings the computer is doing what you thing it is doing...
> maybe it?
> Hamish

More information about the grass-dev mailing list