2015年9月27日 星期日

QGIS : Merge two layers using Raster calculator include NoData values 合併圖層

Press Ctrl+Alt+M open commander

Open Processing algorithm: Raster calculator



QGIS 2.10.x
  • Main input layer 
Select first input layer ( as variable a, DEM, sea level == NoData )

Sea = white area



  • Additonal layers 
Select second input layer ( as variable b, Bathymetry ) 


  • Formula 

ifelse(gt(a,0), a, b)
if a > 0 then output = a else output = b
  • Use NoData
Checked
  • Result 

The resulting layer

Note :


If your Main input layer contains NoData values, where the region  will be ignored in the calculation.
You must check the option "Use NoData" so calculated correctly.

沒有留言:

張貼留言