Hamish wrote:
Micha wrote:
So r.region actually does a kind of affine transformation? I don't
remember seeing this documented anywhere (the manual says
"...manage the boundaries...") , and I must say it's confusing and
unexpected that a module called r.region (similar to g.region)
shifts/changes the data, rather than just defining the region
and resolution.
it does not touch the data array. It only modifies where that array is
thought to be in space. i.e. it just edits the $MAPSET/cellhd/$MAPNAME
file.
if you put new bounds which don't exactly match the array size it will
adjust your resolution so that it does.
Hamish
I guess my misunderstanding is just semantic. If the module were named
r.shift or r.translate I'd have no problem.
If I do something silly like: starting with a raster with an extent of
N=560000 and S=360000 and I run:
r.region map n=480000 s= 440000
then the raster gets "squashed" into the smaller region.
By comparison, there's no v.region which shifts where the vector
features are in space. But if I choose to shift a vector map, I use the
"move" tool in v.edit. That makes perfect sense, but r.region doing such
a shift caught me by surprise. So r.region seems closer to gdalwarp
that to any region settings.
Micha
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user