Thank you everyone for your help. As always, GRASS offers many possibilities to do anything. I solved with r.out.xyz.<br><br>Best,<br><br>Margherita<br><br><div class="gmail_quote">2010/6/3 Christian Schwartze <span dir="ltr"><<a href="mailto:christian.schwartze@uni-jena.de">christian.schwartze@uni-jena.de</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="padding-left: 10px; padding-right: 10px; padding-top: 15px;" name="Compose message area">
<div><font face="Calibri">Margherita,</font></div>
<div><font face="Calibri">now I got your point...I had a very similar problem a
short time ago, but finally I was able to solve it. If your are interested
in, take a look to the following notes - I know, a bit complicated but it works
<img style="margin: 0px; float: none;" title="Zwinkerndes Smiley Emoticon" alt="Zwinkerndes Smiley Emoticon" src="cid:7DB8DBAC31E94AD7869AE9C8F802551F@chrislaptop"></font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">- set your desired path as a mask for limiting following
calculations using r.mask</font></div>
<div><font face="Calibri">- r.describe -dr <your_dem> to fetch min and max
of elevation along your path (use tool awk or any other string
processing function like split() in Python) </font></div>
<div><font face="Calibri">- r.to.vect to convert the mask into a vector line, and
then v.to.db -p <your_vector_path> option=length column=s to print out the
path length (therefor, parse the string again to fetch the column that contains
the length)</font></div>
<div><font face="Calibri">- now you can calculate the slope based on altitude
difference and distance...</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">Perhaps it is adaptable to yours...</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">Christian.</font></div>
<div><font face="Calibri"></font> </div>
<div style="font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<div><font size="3" face="Calibri"></font><br></div>
<div style="background: rgb(245, 245, 245) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<div><b>From:</b> <a title="mailto:diregola@gmail.com
STRG + Klicken, um Verknüpfung zu folgen" href="mailto:diregola@gmail.com" target="_blank">Margherita Di Leo</a> </div>
<div><b>Sent:</b> Wednesday, June 02, 2010 6:50 PM</div>
<div><b>To:</b> <a title="mailto:christian.schwartze@uni-jena.de
STRG + Klicken, um Verknüpfung zu folgen" href="mailto:christian.schwartze@uni-jena.de" target="_blank">Christian Schwartze</a> </div>
<div><b>Cc:</b> <a title="mailto:grass-user@lists.osgeo.org
STRG + Klicken, um Verknüpfung zu folgen" href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a> </div>
<div><b>Subject:</b> Re: [GRASS-user] get coords from a raster</div></div></div><div><div></div><div class="h5">
<div><br></div>Christian,<br><br>thank you for answering. My problem is that I
don't want to use the slope map to get slope, bu i want to calculate it as the
<br>ratio between the difference of the elevation and the distance between two
given points (pixels). To do that, I need to get the coordinates of the points
as a input file for r.profile.<br><br>Margherita<br><br><br>
<div class="gmail_quote">2010/6/2 Christian Schwartze <span dir="ltr"><<a title="mailto:christian.schwartze@uni-jena.de
STRG + Klicken, um Verknüpfung zu folgen" href="mailto:christian.schwartze@uni-jena.de" target="_blank">christian.schwartze@uni-jena.de</a>></span><br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<div style="padding-left: 10px; padding-right: 10px; padding-top: 15px;" name="Compose message area">
<div><font face="Calibri">Why are you not using r.statistics, since it takes one
base map (your path as a raster) and another map containing data you want to
analyze (your slope). With the "average" option/method you will get
the desired result, if I understand you correctly...</font></div>
<div><font face="Calibri"></font> </div>
<div><font face="Calibri">Christian.</font></div>
<div style="font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<div><br></div>
<div style="background: rgb(245, 245, 245) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<div><b>From:</b> <a title="mailto:diregola@gmail.com
STRG + Klicken, um Verknüpfung zu folgen" href="mailto:diregola@gmail.com" target="_blank">Margherita Di Leo</a> </div>
<div><b>Sent:</b> Wednesday, June 02, 2010 6:17 PM</div>
<div><b>To:</b> <a title="mailto:grass-user@lists.osgeo.org
STRG + Klicken, um Verknüpfung zu folgen" href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a> </div>
<div><b>Subject:</b> [GRASS-user] get coords from a raster</div></div></div>
<div>
<div></div>
<div>
<div><br></div>Hi List,<br><br>I'm trying to make a script to calculate the
slope along a path. I want to calculate the slope as the average of cell per
cell slope. For my purpose I found r.profile to produce the input file for my
script, but I have to give it the coordinates of the points. As I have a
raster and not a vector, I was wondering if is there a non interactive way
like a d.where or something like that, that i can use for my purpose. I mean,
i have a raster in which there is the path i'm interested in, and the other
cells are null.<br><br>Thank you in advance<br><br>Margherita<br></div></div>
<p></p>
<hr>
<p></p>_______________________________________________<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></blockquote></div><br></div></div></div>
</blockquote></div><br>