[GRASS-dev] Zooming issue in gis manager

Glynn Clements glynn at gclements.plus.com
Wed Nov 1 01:38:55 EST 2006


Michael Barton wrote:

> The reported problem with displaying grid cells at high magnification is
> primarily or entirely a function of how g.region -a aligns the region with
> the raster grid cell boundaries. I don't know how this works internally and
> someone with C programming experience will have to deal with it if we want
> it to work differently

		window.ns_res = x;
		window.ew_res = x;

		if (flag.res_set->answer) {
			window.north =  ceil(window.north/x) * x ;
			window.south = floor(window.south/x) * x ;
			window.east = ceil(window.east/x) * x ;
			window.west = floor(window.west/x) * x ;
                }

IOW, it essentially shifts the cell grid such that the origin of the
coordinate system lies on the intersection between four cells.

Given that the origin for most coordinate systems is a completely
arbitrary location arising from various completely arbitrary constants
(e.g. whichever round numbers where chosen as the false easting and
northing), I have no idea what the intended purpose of the -a flag is,
but I'm fairly sure that it shouldn't be used by default.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list