<div dir="ltr"><div><div>Hi Martin and Stefan,<br><br>I understand, if we do not use the -a flag, we can not ensure that the resolution is the set.<br><br>What if there is another option, "align=", as Stefan suggested, which allows to choose a raster from the canvas? This would ensure that the region would be aligned with a selected raster?<br><br></div>Thank you very much!<br><br></div>Pedro<br><br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-12 10:44 GMT+00:00 Blumentrath, Stefan <span dir="ltr"><<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
________________________________________<br>
Von: Qgis-developer [<a href="mailto:qgis-developer-bounces@lists.osgeo.org">qgis-developer-bounces@lists.osgeo.org</a>] im Auftrag von gene [<a href="mailto:martin.laloux@gmail.com">martin.laloux@gmail.com</a>]<br>
Gesendet: Samstag, 12. März 2016 10:46<br>
An: <a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a><br>
Betreff: Re: [Qgis-developer] Problem with GRASS Region Extent and Region Cellsize on Processing<br>
<div><div class="h5"><br>
To keep the raster resolution.<br>
<br>
In the book "OPEN SOURCE GIS A GRASS GIS Approach Third Edition",   p.57<br>
<br>
"It may happen, that region boundaries lead to a modified, non-integer<br>
raster resolution. If this is not desired, the -a flag can be used to align<br>
the region to resolution. It adjusts all four boundaries to be even<br>
multiples of the resolution by slightly enlarging the current region. To see<br>
the effect, compare:<br>
g.region res=15 -dp<br>
g.region res=15 -adp"<br>
<br>
Look also:<br>
<br>
-  suggestion for g.region -a<br>
<<a href="http://osgeo-org.1560.x6.nabble.com/suggestion-for-g-region-a-td4014517.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/suggestion-for-g-region-a-td4014517.html</a>><br>
(Michael Barton)<br>
<br>
"Currently, if you use the -a flag with g.region it will align the region<br>
exactly to match the resolution of a map (e.g. g.region -a rast=myrast will<br>
set the region to exactly the resolution of myrast regardless of the<br>
extents) or the resolution specified in the res or ewres/nwres fields (e.g.<br>
g.region -a n=523 s=15 res=10 will adjust the extents a little to make sure<br>
the resolution is exactly 10)"<br>
<br>
- or in  proposal: make -a flag the default behaviour for g.region<br>
<<a href="https://trac.osgeo.org/grass/ticket/1745" rel="noreferrer" target="_blank">https://trac.osgeo.org/grass/ticket/1745</a>>  (Moritz Lennert)<br>
<br>
"In my experience, when working with raster, having a precise resolution is<br>
the most important issue, while exact extension is less important. I often<br>
use existing vector data or bounds coordinates to determine the extent, but<br>
then have to use the -a flag to make sure that the desired resolution is<br>
kept.<br>
I would like to propose that in grass7, the behaviour is switched, i.e. to<br>
make the -a flag (Align region to resolution) the default behaviour, and<br>
"align to bounds" the option"<br>
<br>
<br>
<br>
</div></div>I guess it depends a bit what the most suitable solution is... There is also the "align" option which aligns the resolution to an input raster. Personally, i only use tha a-flag only in combination with the res option...<br>
Cheers,<br>
Stefan<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Problem-with-GRASS-Region-Extent-and-Region-Cellsize-on-Processing-tp5255693p5255960.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/Problem-with-GRASS-Region-Extent-and-Region-Cellsize-on-Processing-tp5255693p5255960.html</a><br>
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div></div></blockquote></div><br></div>