Monday 29 April 2019

raster - Calculating elevation profile along line from a DEM?



Given a DEM (Digital Elevation Model) and a line (x1,y1) --> (x2,y2) (paired coordinates (x,y)), how can one calculate the elevation profile or cross-section projected on that line?


I am looking for an open source code that I can use in my project or pseudo-code that I can use as a guide.



Answer



The GRASS command r.profile performs this (documentation, source) and should provide a good basis for implementing a cross section, and is available under the GPL.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...