<html style="direction: ltr;">
<head>
<meta content="text/html; charset=windows-1255"
http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="preferred-charset"
bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 16/12/2015 07:57, Szilard Albert
wrote:<br>
</div>
<blockquote
cite="mid:CAF=LnqzVP34hVDed_GJf1BQ19npBJWsK5EAOmTC37FN+-493tg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hello,<br>
<br>
</div>
I need to extract elevation values from a DEM at certain
points for which I have X and Y values.<br>
</div>
My points are contained in several profiles, each profile
with hundreds of points. <br>
<br>
</div>
My input is a text file, one file per profile, with the
following format:<br>
<br>
</div>
<div>PointA X Y<br>
</div>
<div>PointB X Y<br>
......<br>
</div>
<div>PointZ X Y.<br>
<br>
</div>
<div>I would like a solution where I can feed the above text
input, and get my output as another text file<br>
</div>
<div>with similar format, Point X Y Z (or Point Z X Y).
Alternatively just a text file with one column containing Z,<br>
</div>
<div>but exactly same number of rows, so I can copy and paste to
the input.<br>
<br>
</div>
<div>One single command that solves one point only would do as
well, I would just create a script file from my every<br>
</div>
<div>text file for every line....<br>
<br>
</div>
<div>Any suggestions would be greatly appreciated.<br>
<br>
</div>
<div>I am using QGIS 2.8 Wien in Ubuntu.<br>
<br>
</div>
</div>
</blockquote>
<br>
If you want to work with GRASS, there's an easy workflow for this:<br>
<br>
# First, as always, create a GRASS location with CRS matching your
DEM and points, then<br>
# Import your text file into GRASS as a points layer:<br>
v.in.ascii input=<your text file> output=points columns="label
text, x double, y double" x=2 y=3 sep=space<br>
# Add a column to hold elevation<br>
v.db.addcolumn map=points column="elev double"<br>
# Import DEM raster<br>
r.in.gdal input=<your DEM raster> output=dem<br>
# As always,set the region<br>
g.region -p rast=dem<br>
# Now get elevations for all points<br>
v.what.rast map=points column=elev raster=dem<br>
# And create the output results file<br>
v.out.ascii input=points output=points.csv column="elev" sep=space<br>
<br>
<br>
<br>
<blockquote
cite="mid:CAF=LnqzVP34hVDed_GJf1BQ19npBJWsK5EAOmTC37FN+-493tg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Thank you.<br>
</div>
<div>Szilard<br>
<br>
</div>
<div><br>
<br>
</div>
<div><br>
</div>
<br>
</div>
<br>
This mail was received via Mail-SeCure System.<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<p><br>
</p>
<br>
<div class="moz-signature">-- <br>
<div dir="LTR">
Micha Silver<br>
Arava Drainage Authority<br>
cell: +972-523-665918
</div>
</div>
</body>
</html>