[GRASS-user] r.profile grass64_rc5 - grass7

John Tate john.tate at ntlworld.com
Mon Feb 22 07:21:45 EST 2010


On Monday 22 February 2010 09:22:55 Francesco Mirabella wrote:
> Hi Hamish,
> many thank you for your messege,
> 
> Hamish wrote:
> > 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.
> 
> Ok, this is what I rechoned
> 
> > 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?
> 
> Yes, it is really a nice tool with beatifull graphical rendering
> 
> >> 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)

Cheers for pointing out my obvious mistake, v.what.rast is what I meant.

I looked at v.rast.stats. Nice that it updates the table but for this purpose, 
it produces a lot of extra unneeded columns (shame you can't select which 
stats to add to the table - or perhaps you can?).

> > 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?
> 
> Yes, however, maybe the possibility to make a straight ascii export of
> distance-elevation data from the wxGUI profile tool would be good.
> (d.profile did this before by giving plot.A, plot.B etc..). At present
> the user can export images (png, svg ect.) but not the data from the
> wxGUI profile tool. I think this would be good if one needs to plot more
> data along a topographic profile (in the same graph).
> Of course at present the r.profile command-line workaround works good,
> but maybe a more intuitive tools would be good (in the wxGUI mood :-))
> 
> best wishes
> 
> Francesco
> 
> >> 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
> 
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
> 


More information about the grass-user mailing list