[GRASS-user] r.profile grass64_rc5 - grass7

Hamish hamish_b at yahoo.com
Fri Feb 19 20:51:04 EST 2010


Francesco Mirabella wrote:
> I am trying to use the r.profile module on a DEM. I have
> tried on both grass64_rc5 and grass7 with wxpython gui.
>
> In 64_rc5 there still exist the "old" option which allowed
> the user to interactively select the end-points by mouse,
> but the function does not appear to work as I get:
> --------------------------------------------------------------------------------
> r.profile -i input=DEM output=profile
> Using resolution [90.0161]
> No socket to connect to for monitor <cairo7>.
> ---------------------------------------------------------------------------------
> I can use it only with the oldtcltk


Right, the new GUIs do not use Xmon windows (started with d.mon)
and in general you can not use d.* and interactive xmon modules
with them. You have to use the built-in GUI tools instead.

In this case use the GUI profile tool, which is in the map
display window just to the right of the magnifying glass buttons.
The button looks like a little line graph.

> In grass 7 the possibility to choose the end-points with
> mouse is not there any more

as the interactive Xmonitors have been completely removed there.
(no more 'd.mon x0')


> By the way, the display profiler in the monitor works good
> in 64_rc5 - not i grass7 (I guess it's the "old" d.profile")

The wxGUI profile tool from the map display window button?

> but I cannot see any way to export the data in ascii format
> (distance-elevation) to load them into a spreadsheet

if you use the query raster map button in the map display window
GUI you will see the easting,northing,value text printed to
the layer manager output window. you can then Save output from
there or highlight+right-click Copy the end points to a text
file and then pass that to r.profile. Not not very smooth- file
a wish in the trac bug/wish system to save the profile values to
a text file from the gui profile tool if you like.

John Tate wrote:
> I used d.what.rast as I had ground control points, from GPS,
> for the profiles with which to validate the DEM. Add columns
> and update them with d.what.rast and export (.csv), then I put
> that together with the distance info from the GPS data.

v.what.rast might help, or r.what.

(I prefer v.rast.stats with a small buffer around each point to
smooth any noise; some scripts in addons for aiding with that)


Francesco:
> by browsing the man pages I have found that r.transect should
> do the work. Howevere at the moment it works by telling the
> module east, north, azimuth and distance,

r.transect is just a wrapper around the r.profile module. All
it does is convert the heading,distance to x2,y2 for you.


> while maybe it would be good to have also another couple of
> options like:
> 
> 1 choose a vector make with sql query to tell the module where
> to sample elevations

v.what.rast

> 2 be able to draw a cross sections and get and ascii file
> distance-elevations (this could be achieved by d.profile if
> there was such an option)

isn't this what the r.profile output gives?

> At present the only way I can get a topographic profile to
> load into a spreadsheet is to use the oldtcltk, query the
> raster (d.where) and then use the d.where output as the input
> data for r.profile (still in oldtcltk) which gives me an ascii
> distance-elevation file. Indetail:
> 
> cat  d.where-output  | r.profile input=dem output=elevation_points

fwiw you can simplify:
 d.where | r.profile input=rastermap output=-



Hamish



      


More information about the grass-user mailing list