making grid file from ascii xyz files - アスキー水深データからグリッドをつくる 

  使うコマンド  xyz2grd, nearneighbor, blockmedian, surface

xyz2grd
nearneighbor
surface




bash スクリプト例    xyz2grd
#  make grid file from xyz files using xyz2grd

# parameter setting
region=137:40/137:55/16:40/17           # grid region east/west/south/north
interval=0.04m                          # grid interval
xyzfile=area.xyz                        # input xyz file
grdfile=area.xyzgrd                    # output grid file
#
gmt xyz2grd $xyzfile -R$region -I$interval -G$grdfile -fg -V


bash スクリプト例    nearneighbor
#  make grid file from xyz files using nearneighbor

# parameter setting
region=137:40/137:55/16:40/17           # grid region east/west/south/north
interval=0.04m                          # grid interval
radius=0.5k                             # grid search radius
xyzfile=area.xyz                        # input xyz file
grdfile=area.xyzgrd                    # output grid file
#
gmt nearneighbor $xyzfile -R$region -I$interval -S$radius -G$grdfile -fg -V

bash スクリプト例   surface
#  make grid file from xyz files using surface

# parameter setting
region=137:40/137:55/16:40/17           # grid region east/west/south/north
interval=0.04m                          # grid interval
tension=0.65                             # tension factor
xyzfile=area.xyz                        # input xyz file
blkfile=area.blk                        # block file
grdfile=area.grd                    # output grid file
#
gmt blockmedian $xyzfile -R$region -I$interval -V > $blkfile
gmt surface $blkfile -R$region -I$interval -T$tension -G$grdfile -fg -V