GAMMA软件 数据处理过程中数字高程模型准备

1.将需要拼接的dem文件放入同一文件夹内

mk_tab ./ hgt dem_par dem_tab

2.multi-mosiac命令的使用

(base) n@MSI:~$ multi_mosaic
*** Mosaic geocoded images or DEM data with same format, map projection, and pixel spacing parameters ***
*** Supported formats: float, fcomplex, int, short, unsigned char, SUN raster, and BMP image files ***
*** Copyright 2019, Gamma Remote Sensing, v1.8 12-Mar-2019 clw/awi/cm ***

usage: multi_mosaic <data_tab> <data_out> <DEM_par_out> <mode> <format_flag>

input parameters:
  data_tab     (input) list of data to mosaic (2 columns), one line for each input data file (text format):
                 data   DEM_par
  data_out     (output) output data file
  DEM_par_out  (output) DEM parameter file of output data file
                 NOTE: If this file exists, then the bounds of the mosaic are read from the parameter file,
                 otherwise bounds including all input data will be computed and written to the parameter file
  mode         mosaic processing mode
                 0: value of prior image preferred in the case of multiple valid input values
                 1: average of multiple valid input values calculated
  format_flag  input/output data format flag
                 0: FLOAT (REAL*4)
                 1: FCOMPLEX (pairs of float)
                 2: INTEGER (INTEGER*4)
                 3: SHORT (INTEGER*2)
                 4: UNSIGNED CHAR
                 5: SUN raster, BMP, or TIFF image files (8 or 24 bit)

dem_tab文件准备

dem_par文件准备

注意:红框中是影像左下角坐标

命令窗口中输入以下语句

 multi_mosaic dem_tab mosaic.dem mosaic.dem.par 1 3

查询融合后的dem 宽度

 WEITH=`awk '$1=="width:" {print $2}' mosaic.dem.par`
 echo $WEITH

3.replace-value、interp_ad命令的使用

(base) n@MSI:~$ replace_values
*** DISP Program replace_values ***
*** Copyright 2022, Gamma Remote Sensing, v1.7 20-Jul-2022 uw/clw/ts/cm ***

*** Replace value(s) of input data file with specified value or values extracted from a second input data file ***
usage: replace_values <data_in> <value> <new_value> <data_out> <width> [rpl_flg] [dtype] [zflg]

input parameters:
  data_in    (input) input data file
  value      threshold value or nan
  new_value  new value to use or a second input data file that is used to replace values in the output
             NOTE: if this is a second input data file, it must be the same data type as data_in
  data_out   (output) output data file
             NOTE: data_in and data_out can be the same file
  width      number of samples/row
  rpl_flg    replacement option flag (enter - for default)
               0: replace all points == value with new_value (default)
               1: replace all points >= value with new_value
               2: replace all points <= value with new_value
  dtype      data type (enter - for default)
               2: FLOAT (default)
               4: SHORT integer
  zflg       interpretation of 0.0 values (enter - for default)
               0: zero is interpreted as NO_DATA and is not changed (default)
               1: zero is a valid data value
(base) n@MSI:~$  interp_ad
*** Weighted interpolation of gaps in 2D data using an adaptive smoothing window ***
*** Copyright 2018, Gamma Remote Sensing, v2.1 13-Jun-2018 clw/uw ***

usage: interp_ad <data_in> <data_out> <width> [r_max] [np_min] [np_max] [w_mode] [dtype] [cp_data]

input parameters:
  data_in   (input) data with gaps
  data_out  (output) data with gaps filled by interpolation
  width     number of samples/row
  r_max     maximum interpolation window radius (default(-): 16)
  np_min    minimum number of points used for the interpolation (default(-): 16)
  np_max    maximum number of points used for the interpolation (default(-): 16)
  w_mode    data weighting mode (enter - for default):
              0: constant
              1: 1 - (r/r_max)
              2: 1 - (r/r_max)**2  (default)
              3: exp(-2.*(r**2/r_max**2))
  dtype     input and output data type:
              0: FCOMPLEX
              1: SCOMPLEX
              2: FLOAT (default)
              3: INT
              4: SHORT
  cp_data   copy data flag:
              0: do not copy input data values to output
              1: copy input data values to output (default)

输入以下语句

replace_values mosaic.dem 0 1 temp1 $WEITH 0 4
replace_values temp1 -9999 0 temp2 $WEITH 0 4
interp_ad temp2 mosaic.dem $WEITH 16 40 81 2 4
rm -f temp1
rm -f temp2
disdem_par  mosaic.dem   mosaic.dem.par

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值