TatukGIS menu

Q&A - Question

Convert DEM elevation from meters to feet

Question
Crag Cox asked on June 17, 2022, keyword: Viewer / Editor
Is there a way to convert a GeoTiff DEM elevation from meters to feet using the Editor? 
Answers
Michal Kowalczuk replied June 17, 2022
Yes. Simply run a Pipeline tool from Tools menu and use the code below:
; Get an elevation layer from GIS
Layer.Get Result=$dem_meters Name=<grid layer name>
; Create output pixel layers
Layer.CreateGrid Result=$dem_feets Name=DemFeets Path=E:\Temp\ElevationFeets.flt CS=$dem_meters Extent=$dem_meters Width=$dem_meters Height=$dem_meters Save=True
; Use raster algebra to convert meters to feets
Algebra Result=$dem_feets Layer0=$dem_meters Formula="Result=Layer0*3.28"
; Optionally generate color ramp
Grid.GenerateRamp Layer=$dem_feets StartColor=ARGB:FFffffb2 EndColor=ARGB:FFbd0026 MinValue=-125 MaxValue=775 UseMiddle=False ColorSpace=RGB
GIS.FullExtent


That's it!
 
If you would like to answer the question please Sign In.
*
*
Please review our recent Privacy Policy.
If you have any questions or requests, please contact us.
Rules
The Questions and Answers (Q & A) is intended to provide a means of communication between TatukGIS customers.
 
  1. Licensed users (with active maintenance play) of TatukGIS products may contribute to the Q & A content. Read-only access is available to anyone.
  2. Keep the content positive and professional.
  3. Be courteous to others by posting information when a question or issue asked on the Q & A is answered or resolved by other means (such as with help from TatukGIS technical support). Offer others at least a hint how the posted question was answered or the issue was resolved.
  4. The Q & A is not a replacement for TatukGIS technical support. TatukGIS team may or may not regularly follow or contribute content.