PikoBoZ wrote: > Im trying to use the r.out.ascii command but it fails > Got an existing mapset, with some elevation rasters in it (.tiff > converted in grass raster) > I'd like to extract the xyz values of a DEM to txt file > I use this syntax in the grass shell: > [code] > r.out.ascii input=mnt output=testmnt.txt > [/code] > testmnt.txt is created and the header is written,but the x,y,z values > are > missing, only stars appear in it, like this: > [code] > north: 2787570 > south: 1546950 > east: 1284500 > west: -47544.1 > rows: 931 > cols: 999 > * * * * * * * * * * * * * > * * * * * * * * * * * * * > * * * * * * * * * * * * * > [/code] > Is anybody understands what happens?
r.out.ascii exports a rectangular array of values (like for a spreadsheet with x & y axes), in your above example 931x999 cells. The "*"s represent NULL data. Raster ops. work on the current zoom region. see the g.region module. e.g. set to the region to the exact extent of the raster map with: g.region rast=mnt > Does a r.out.xyz command exist? or any other way to get x,y,z values > from a raster? yes, there is a r.out.xyz, but only in grass 6.3. http://grass.ibiblio.org/grass63/manuals/html63_user/r.out.xyz.html http://trac.osgeo.org/grass/browser/grass/trunk/scripts/r.out.xyz but that is just a more obvious alias for "r.stats -1gn", so for GRASS 6.2 you can use that. Hamish ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
