Thanks to everyone for their responses. I did not try all the methods. One method that did work (and was mentioned more than once) was basically:<br><br>v.to.points (convert 2d lines to points)<br>v.out.ascii (export coordinates to txt file)<br>
cat "coords.txt" | r.profile (input text file coords to r.profile)<br><br>However, this worked for only one line/path at a time (by using SQL where clause with an attribute unique to each path) and I had a shapefile with about 20 paths. Likely this could have been scripted to process efficiently. Unfortunately, I'm still learning the basics of GRASS and did not want to get into scripting yet!<br>
<br>I went with SAGA in the end. Thanks Ricardo for that suggestion! It worked great and had exactly what I wanted. Also, it's a good idea to start with a clean line vector dataset, regardless of which method you choose. It took a fair bit of time to snap/merge several line segments together to get my paths to come out right. Thanks again.<br>
<br>- John<br><br clear="all">**************************************************<br>John Callahan, Geographic Information Scientist<br>Delaware Geological Survey, University of Delaware<br>URL: <a href="http://www.dgs.udel.edu">http://www.dgs.udel.edu</a><br>
**************************************************<br>
<br><br><div class="gmail_quote">On Fri, Jul 16, 2010 at 4:15 AM, Francesco Mirabella <span dir="ltr"><<a href="mailto:mirabell@unipg.it">mirabell@unipg.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
I had a similar issue while extracting an elevation profile for a river. I think it's similar to your problem.<br>
<br>
Afaik v.drape produces x,y,z vector map, if you need to export it, maybe you should use v.out.ascii. However, v.drape gives coordinates of points, NOT the distance between each point which I think you need if you want to get an elevation profile (distance vs elevation). To do this I suggest the following:<br>
<br>
v.out.ascii of your 2d vector (road)<br>
cat output_of_v.out.ascii | r.profile input=your_dem output=elevation_profile<br>
<br>
Hope it helps<br>
cheers<br><font color="#888888">
Francesco</font><div><div></div><div class="h5"><br>
<br>
<br>
<br>
<br>
Hamish wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
yet another two methods to try-<br>
<br>
(spearfish dataset)<br>
<br>
# v.out.ascii | r.profile method<br>
<br>
g.region -d<br>
v.in.region sp_box<br>
v.type in=t_powerlines out=t_powerline type=boundary,line<br>
v.overlay ain=t_powerline bin=sp_box out=sp_powerline atype=line op=and<br>
v.build.polylines in=sp_powerline out=sp_powerline_pl<br>
g.remove v=sp_box,t_powerline,sp_powerline<br>
<br>
v.out.ascii in=sp_powerline_pl format=standard | grep '^ ' | \<br>
r.profile -g in=elevation.dem res=30<br>
<br>
<br>
<br>
# v.to.rast MASK method<br>
<br>
v.type in=t_powerlines out=t_powerline type=boundary,line<br>
v.category in=t_powerline out=t_powerline_with_cat option=add<br>
v.to.rast in=t_powerline_with_cat out=MASK use=val value=1<br>
g.remove v=t_powerline,t_powerline_with_cat<br>
<br>
r.out.xyz elevation.dem<br>
g.remove MASK<br>
<br>
<br>
<br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</blockquote>
<br>
<br>
<br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</div></div></blockquote></div><br>