コード例 #1
0
ファイル: setinit.py プロジェクト: yuankunxu/dclaw-apps
def lower_DEM(infile, outfile, dZ):

    if (not os.path.isfile(outfile)):
        (X, Y, Z) = gt.topofile2griddata(infile)
        Z = Z - dZ
        gt.griddata2topofile(X, Y, Z, outfile, topotype=3)
コード例 #2
0
ファイル: setinit.py プロジェクト: yuankunxu/dclaw-apps
def clip_DEM(infile, outfile, elevation):

    if (not os.path.isfile(outfile)):
        (X, Y, Z) = gt.topofile2griddata(infile)
        Z[np.where(Z > elevation)] = -9999
        gt.griddata2topofile(X, Y, Z, outfile, topotype=3)
コード例 #3
0
ファイル: setinit.py プロジェクト: yuankunxu/dclaw-apps
def make_m0_DEM(infile, outfile, m0):

    if (not os.path.isfile(outfile)):
        (X, Y, Z) = gt.topofile2griddata(infile)
        Z = 0. * Z + m0
        gt.griddata2topofile(X, Y, Z, outfile, topotype=3)