Hi, i share an image where the display n.1 shows the non-align between the Arcmap ASCII and the output Grass ASCII which was created by the r.out.arc function.<br><br>I think the problem is in this step... . As you can observe in the display n.2, the output grid of r.mapcalc function is aligned with the  Arcmap ASCII, but it loss the g.region properties when it is exported. Finally, i checked the properties of the output grid of r.mapcalc with the g.region -g function and it retained the same extend and resolution of Arcmap ASCII...<br>
<br>Mark, i set the region as you tried...<br><br>Thanks in advance,<br><br><br><div class="gmail_quote">2012/5/9 Markus Metz <span dir="ltr">&lt;<a href="mailto:markus.metz.giswork@googlemail.com" target="_blank">markus.metz.giswork@googlemail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Tue, May 8, 2012 at 9:41 PM, Alejandro Coca Castro &lt;<a href="mailto:acocac@gmail.com">acocac@gmail.com</a>&gt; wrote:<br>

&gt; Hi Mark, i followed your instructions, so i put in command-line<br>
&gt;<br>
</div>This<br>
<div class="im">&gt; g.region rast=MASK@default nsres=0:00:07.5 ewres=0:00:07.5<br>
<br>
</div>will adjust, i.e. modify the resolution in order to fit into the<br>
extents. The extents are not modified. In GRASS, the extents have<br>
precedence over resolution, unless you use the -a flag, in which case<br>
the extents are aligned to the desired resolution. Thus use either<br>
<br>
g.region rast=MASK@default nsres=0:00:07.5 ewres=0:00:07.5 -a<br>
<br>
to align the current region to the desired resolution and enforcing<br>
this resolution, or<br>
<br>
g.region rast=MASK@default<br>
<br>
You can check if the current region is all right with g.region -p or<br>
g.region -g, before doing any processing.<br>
<br>
I tried to set the region with the gdalinfo output of the ArcMap<br>
raster fileASC_ARCMAP.asc:<br>
<br>
g.region w=-60.9250001 e=-49.9979167 n=-0.0000001 s=-10.0000001<br>
res=0.00208333333<br>
<br>
Output of g.region -g:<br>
n=-1e-07<br>
s=-10.0000001<br>
w=-60.9250001<br>
e=-49.9979167<br>
nsres=0.00208333333333333<br>
ewres=0.00208333334604385<br>
rows=4800<br>
cols=5245<br>
cells=25176000<br>
<br>
As you can see, the resolution needed to be adjusted, i.e. there are<br>
floating point rounding errors in fileASC_ARCMAP.asc. Using rounded<br>
DD:MM:SS.S format:<br>
<br>
g.region w=60:55:30W e=49:59:52.5W n=0 s=10S res=00:00:07.5<br>
<br>
Output of g.region -g:<br>
n=0<br>
s=-10<br>
w=-60.925<br>
e=-49.9979166666667<br>
nsres=0.00208333333333333<br>
ewres=0.00208333333333333<br>
rows=4800<br>
cols=5245<br>
cells=25176000<br>
<br>
This is probably the desired extents and resolution, the resolution<br>
did not need to be adjusted (0.00208333333333333 = 00:00:07.5) .<br>
<br>
Markus M<br>
<div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt; Now, I get the same number of columns and rows. However, the cell size isn&#39;t<br>
&gt; the same that ArcMAP output file...so i think it can be the reason of<br>
&gt; non-similar extend and origin....<br>
&gt;<br>
&gt; Below i show you the output gdalinfo,<br>
&gt;<br>
&gt; Driver: AAIGrid/Arc/Info ASCII Grid<br>
&gt; Files: D:\gras_data\temp\test5.asc<br>
&gt;<br>
&gt; Size is 5245, 4800<br>
&gt; Coordinate System is `&#39;<br>
&gt; Origin = (-60.924999999999997,-0.001600000000000)<br>
&gt; Pixel Size = (0.002083000000000,-0.002083000000000)<br>
&gt; Corner Coordinates:<br>
&gt; Upper Left  ( -60.9250000,  -0.0016000)<br>
&gt; Lower Left  ( -60.9250000, -10.0000000)<br>
&gt; Upper Right ( -49.9996650,  -0.0016000)<br>
&gt; Lower Right ( -49.9996650, -10.0000000)<br>
&gt; Center      ( -55.4623325,  -5.0008000)<br>
&gt; Band 1 Block=5245x1 Type=Int32, ColorInterp=Undefined<br>
&gt;   NoData Value=-9999<br>
&gt;<br>
&gt; Do you have others ideas?<br>
&gt; ------<br>
&gt;<br>
&gt; Jacquie, thanks for your comments, i hope the next SPs versions fix these<br>
&gt; kind of bugs.<br>
&gt;<br>
&gt; regards,<br>
&gt;<br>
&gt; 2012/5/8 Alejandro Coca Castro &lt;<a href="mailto:acocac@gmail.com">acocac@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi, i tried to convert the following enviroments settings to GRASS<br>
&gt;&gt; g.region and r.mask for the next ARCGIS output (ASCII file):<br>
&gt;&gt;<br>
&gt;&gt;     fileTIF = r&quot;x:\test\fileTIF.tif&quot;<br>
&gt;&gt;     MASK = r&quot;x:\test\mask_file&quot;<br>
&gt;&gt;     env.extent = fileTIF<br>
&gt;&gt;     env.snapRaster = MASK<br>
&gt;&gt;     env.mask = MASK<br>
&gt;&gt;     fileGRD = r&quot;x:\test\fileGRD&quot;<br>
&gt;&gt;     outCon = Con(fileTIF, fileTIF, &quot;&quot;, &quot;VALUE &gt;= 0&quot;)<br>
&gt;&gt;     outCon.save(fileGRD)<br>
&gt;&gt;     fileASC = r&quot;x:\test\fileASC.asc&quot;<br>
&gt;&gt;     env.workspace = fileGRD<br>
&gt;&gt;     RasterToASCII_conversion(fileGRD,fileASC)<br>
&gt;&gt;<br>
&gt;&gt; So, i put on the GRASS command-line:<br>
&gt;&gt;<br>
&gt;&gt; r.mask input=mask_file@default<br>
&gt;&gt; g.region rast=fileTIF@default res=0.00208333333 align=MASK@default<br>
&gt;&gt; r.mapcalc fileGRD = if(fileTIF@default  &lt; 0 , null(), fileTIF@default)<br>
&gt;&gt; r.out.arc input= fileGRD@default output=x:\test\fileASC_grass.asc<br>
&gt;&gt;<br>
&gt;&gt; However, the ArcGIS and GRASS outputs had a different extend and curiously<br>
&gt;&gt; the GRASS output didn&#39;t snap their cells with the MASK. Also, when i observe<br>
&gt;&gt; the GRASS output cellsize, it only has the first 6 decimals (f.e.<br>
&gt;&gt; 0.002083)....<br>
&gt;&gt;<br>
&gt;&gt; Finally i tried to setup the parameters of g.region with the ArcGIS output<br>
&gt;&gt; but GRASS output definetly didnt have the same properties of ArcGIS output<br>
&gt;&gt; (cellsize, columns and rows, extend)<br>
&gt;&gt;<br>
&gt;&gt; If somebody knows how can i fix it, i&#39;ll be grateful,<br>
&gt;&gt;<br>
&gt;&gt; Thanks in advance,<br>
&gt;&gt;<br>
&gt;&gt; Alejandro<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Alejandro Coca Castro<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><b><i><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#404040">Alejandro Coca Castro</span></i></b><b><i><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black"></span></i></b><b><i><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#00502e"></span></i></b><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#404040"></span>

<b><i><span style="font-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black" lang="ES-CO"></span></i></b><i><span style="font-size:9.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#404040"></span></i><br>