[GRASS-dev] more precise zooming -- hopefully

Thanks to various contributions, but especially to Glynn who provided details about the mysterious workings of g.region and sent me a set of algorithms, I think I’ve fixed the problem with zooming in to a tiny region for a raster map, such that the grid-cell size is much larger than display pixels.

This seemed to be an intractable problem. Essentially, due to the way g.region works at these combinations of resolutions and region size (at least this becomes apparent at this scale), the GIS Manager has to handle a lot of the details of managing extents and resolution that g.region does in most normal circumstances. However, Glynn’s algorithms seem to work well on my Mac (using x11) in UTM and latlon regions, and on one of my student’s Debian machines. So I’ve gone ahead and committed this to the cvs for others to test.

I’m also copying Markus. If it works well, it should be backported to 6.2.1.

Michael


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

The rows, cols and res are now OK, after setting the WIND to match
gis.m display. But, the bounds are set wrong - eg., I get:

$ g.region -g
n=4920084.41676
s=4919934.41676
w=599434.138252
e=599614.138252
nsres=30
ewres=30
rows=5
cols=6

while it should be:

n=4920090
s=4919940
w=599430
e=599610
nsres=30
ewres=30
rows=5
cols=6

Maciek