On 16/12/2015 07:57, Szilard Albert wrote:
Hello,

I need to extract elevation values from a DEM at certain points for which I have X and Y values.
My points are contained in several profiles, each profile with hundreds of points.

My input is a text file, one file per profile,  with the following format:

PointA X Y
PointB X Y
......
PointZ X Y.

I would like a solution where I can feed the above text input, and get my output as another text file
with similar format, Point X Y Z (or Point Z X Y). Alternatively just a text file with one column containing Z,
but exactly same number of rows, so I can copy and paste to the input.

One single command that solves one point only would do as well, I would just create a script file from my every
text file for every line....

Any suggestions would be greatly appreciated.

I am using QGIS 2.8 Wien in Ubuntu.


If you want to work with GRASS, there's an easy workflow for this:

# First, as always, create a GRASS location with CRS matching your DEM and points, then
# Import your text file into GRASS as a points layer:
v.in.ascii input=<your text file> output=points columns="label text, x double, y double" x=2 y=3 sep=space
# Add a column to hold elevation
v.db.addcolumn map=points column="elev double"
# Import DEM raster
r.in.gdal input=<your DEM raster> output=dem
# As always,set the region
g.region -p rast=dem
# Now get elevations for all points
v.what.rast map=points column=elev raster=dem
# And create the output results file
v.out.ascii input=points output=points.csv column="elev" sep=space



Thank you.
Szilard






This mail was received via Mail-SeCure System.


_______________________________________________
Qgis-user mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
This mail was received via Mail-SeCure System.



--
Micha Silver
Arava Drainage Authority
cell: +972-523-665918

_______________________________________________
Qgis-user mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to