<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body smarttemplateinserted="true" bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 23-12-16 16:00, Markus Neteler
wrote:<br>
</div>
<blockquote
cite="mid:CALFmHhs1F90JueGY6YJXw57Vj5ncubbA7jacC5UJ6h2ZVV3sBA@mail.gmail.com"
type="cite">
<pre wrap="">On Fri, Dec 23, 2016 at 3:54 PM, Paulo van Breugel
<a class="moz-txt-link-rfc2396E" href="mailto:p.vanbreugel@gmail.com"><p.vanbreugel@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Dear devs,
As I understand, setting the a flag when defining a region should maintain
the original resolution. So when setting different bounds based on a vector
layer and with the a flag set, I would expect exactly the same resolution.
</pre>
</blockquote>
<pre wrap="">
... I think only, when you also use the res=xxx parameter.
<a class="moz-txt-link-freetext" href="https://grass.osgeo.org/grass72/manuals/g.region.html#notes">https://grass.osgeo.org/grass72/manuals/g.region.html#notes</a>
"With the -a flag all four boundaries are adjusted to be even
multiples of the resolution, aligning the region to the resolution
supplied by the user. The default is to align the region resolution to
match the region boundaries. "
Please try along with the res=value.
Markus
</pre>
</blockquote>
Strange, the behaviour I described only happens in one particular
map set I was working in yesterday.<br>
<br>
I have tried out in different map sets now, and there it works as I
expected, i.e., no need to supply the res=value argument.<br>
<br>
<code># start region</code><br>
<code>> g.region -g</code><br>
<code>projection=99</code><br>
<code>zone=0</code><br>
<code>n=227830</code><br>
<code>s=220120</code><br>
<code>w=630970</code><br>
<code>e=638360</code><br>
<code>nsres=10</code><br>
<code>ewres=10</code><br>
<code>rows=771</code><br>
<code>cols=739</code><br>
<code>cells=569769</code><br>
<code><br>
</code><code># setting region based on vector</code><br>
<code>> g.region save=test</code><br>
<code>> g.region vector=test</code><br>
<code>> g.region -g</code><br>
<code>projection=99</code><br>
<code>zone=0</code><br>
<code>n=226729.31747673</code><br>
<code>s=216615.56359876</code><br>
<code>w=630721.30299897</code><br>
<code>e=643766.80455016</code><br>
<code>nsres=10.00371303</code><br>
<code>ewres=9.99655291</code><br>
<code>rows=1011</code><br>
<code>cols=1305</code><br>
<code>cells=1319355</code><br>
<code><br>
</code><code># resetting region, and then setting based on vector
with a flag</code><br>
<code>> g.region region=test</code><br>
<code>> g.region -a vector=test</code><br>
<code>> g.region -g</code><br>
<code>projection=99</code><br>
<code>zone=0</code><br>
<code>n=226730</code><br>
<code>s=216610</code><br>
<code>w=630720</code><br>
<code>e=643770</code><br>
<code>nsres=10</code><br>
<code>ewres=10</code><br>
<code>rows=1012</code><br>
<code>cols=1305</code><br>
<code>cells=1320660</code><br>
<br>
This is how I always assumed, and would hope, it to work. So
depending on the intended behaviour, perhaps the note should be
changed to:<br>
<br>
<tt>"By default the region resolution is aligned to match the region
boundaries.</tt><tt><br>
</tt><tt>With the -a flag all four boundaries are adjusted to be
even multiples of the</tt><tt><br>
</tt><tt>resolution, aligning the region to the resolution supplied
by the user</tt><tt><br>
</tt><tt>(res=xxx), or, if not supplied, to the current resolution"</tt><br>
<br>
<br>
</body>
</html>