On Tue, May 8, 2012 at 6:27 PM, Alejandro Coca Castro <[email protected]> wrote: > Hi, i forgot... below I have included the gdalinfo from both ouputs (ArcMap > and GRASS). Any ideas as to what else I should check would be appreciated. > > #### ArcMap output gdalinfo #### The extents and resolution seem to be written by ArcMap with single precision. Can you write the raster out again with double precision? More comments below.
> gdalinfo x:\test\fileASC_ARCMAP.asc > Driver: AAIGrid/Arc/Info ASCII Grid > Files: x:\test\fileASC_ARCMAP.asc > x:\test\fileASC_ARCMAP.asc.aux.xml > Size is 5245, 4800 > Coordinate System is `' This > Origin = (-60.925000056119998,-0.000000095999999) > Pixel Size = (0.002083333330000,-0.002083333330000) could also be in double precision Origin = (-60.925000000000000,-0.000000000000000) Pixel Size = (0.002083333333333,-0.002083333333333) with pixel size equivalent to exactly 00:00:07.5 > Metadata: > PyramidResamplingType=NEAREST > Corner Coordinates: This > Upper Left ( -60.9250001, -0.0000001) > Lower Left ( -60.9250001, -10.0000001) > Upper Right ( -49.9979167, -0.0000001) > Lower Right ( -49.9979167, -10.0000001) > Center ( -55.4614584, -5.0000001) could also be in double precision Upper Left ( -60.9250000, -0.0000000) Lower Left ( -60.9250000, -10.0000000) Upper Right ( -49.9979167, -0.0000000) Lower Right ( -49.9979167, -10.0000000) Center ( -55.4614583, -5.0000000) The differences may seem small but can make a difference for a 5245x4800 raster. Markus M > Band 1 Block=5245x1 Type=Int32, ColorInterp=Undefined > NoData Value=-9999 > (Tue May 08 11:21:09 2012) Command finished (10 > sec) > (Tue May 08 11:21:42 2012) > > #### GRASS output gdalinfo #### > gdalinfo x:\test\fileASC_GRASS.asc > Driver: AAIGrid/Arc/Info ASCII Grid > Files: x:\test\fileASC_GRASS.asc > x:\test\fileASC_GRASS.asc.aux.xml > Size is 5246, 4801 > Coordinate System is `' > Origin = (-60.927083000000003,0.000483000000001) > Pixel Size = (0.002083000000000,-0.002083000000000) > Metadata: > PyramidResamplingType=NEAREST > Corner Coordinates: > Upper Left ( -60.9270830, 0.0004830) > Lower Left ( -60.9270830, -10.0000000) > Upper Right ( -49.9996650, 0.0004830) > Lower Right ( -49.9996650, -10.0000000) > Center ( -55.4633740, -4.9997585) > Band 1 Block=5246x1 Type=Int32, ColorInterp=Undefined > NoData Value=-9999 > > > > > > 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 > _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
