Hi Mark, i followed your instructions, so i put in command-line g.region rast=MASK@default nsres=0:00:07.5 ewres=0:00:07.5
Now, I get the same number of columns and rows. However, the cell size isn't the same that ArcMAP output file...so i think it can be the reason of non-similar extend and origin.... Below i show you the output gdalinfo, Driver: AAIGrid/Arc/Info ASCII Grid Files: D:\gras_data\temp\test5.asc Size is 5245, 4800 Coordinate System is `' Origin = (-60.924999999999997,-0.001600000000000) Pixel Size = (0.002083000000000,-0.002083000000000) Corner Coordinates: Upper Left ( -60.9250000, -0.0016000) Lower Left ( -60.9250000, -10.0000000) Upper Right ( -49.9996650, -0.0016000) Lower Right ( -49.9996650, -10.0000000) Center ( -55.4623325, -5.0008000) Band 1 Block=5245x1 Type=Int32, ColorInterp=Undefined NoData Value=-9999 Do you have others ideas? ------ Jacquie, thanks for your comments, i hope the next SPs versions fix these kind of bugs. regards, 2012/5/8 Alejandro Coca Castro <[email protected]> > Hi, i tried to convert the following enviroments settings to GRASS > g.region and r.mask for the next ARCGIS output (ASCII file): > > fileTIF = r"x:\test\fileTIF.tif" > MASK = r"x:\test\mask_file" > env.extent = fileTIF > env.snapRaster = MASK > env.mask = MASK > fileGRD = r"x:\test\fileGRD" > outCon = Con(fileTIF, fileTIF, "", "VALUE >= 0") > outCon.save(fileGRD) > fileASC = r"x:\test\fileASC.asc" > env.workspace = fileGRD > RasterToASCII_conversion(fileGRD,fileASC) > > So, i put on the GRASS command-line: > > r.mask input=mask_file@default > g.region rast=fileTIF@default res=0.00208333333 align=MASK@default > r.mapcalc fileGRD = if(fileTIF@default < 0 , null(), fileTIF@default) > r.out.arc input= fileGRD@default output=x:\test\fileASC_grass.asc > > However, the ArcGIS and GRASS outputs had a different extend and curiously > the GRASS output didn't snap their cells with the MASK. Also, when i > observe the GRASS output cellsize, it only has the first 6 decimals (f.e. > 0.002083).... > > Finally i tried to setup the parameters of g.region with the ArcGIS output > but GRASS output definetly didnt have the same properties of ArcGIS output > (cellsize, columns and rows, extend) > > If somebody knows how can i fix it, i'll be grateful, > > Thanks in advance, > > Alejandro > -- *Alejandro Coca Castro***** ****
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
