pyroSAR/gamma/srtm.py
def transform(infile, outfile, posting=90):
    """
    transform SRTM DEM from EQA to UTM projection
    """
    # read DEM parameter file
    par = ISPPar(infile + '.par')

    # transform corner coordinate to UTM
    utm = UTM(infile + '.par')

    for item in [outfile, outfile+'.par']:
        if os.path.isfile(item):
            os.remove(item)

    # determine false northing from parameter file coordinates
    falsenorthing = 10000000. if par.corner_lat < 0 else 0

    # create new DEM parameter file with UTM projection details
    inlist = ['UTM', 'WGS84', 1, utm.zone, falsenorthing, os.path.basename(outfile), '', '', '', '', '', '-{0} {0}'.format(posting), '']
    process(['create_dem_par', outfile + '.par'], inlist=inlist)

    # transform dem
    process(['dem_trans', infile + '.par', infile, outfile + '.par', outfile, '-', '-', '-', 1])
    hdr(outfile+'.par')

    transform SRTM DEM from EQA to UTM projection
    
transform SRTM DEM from EQA to UTM projection
transform SRTM DEM from EQA to UTM projection
def transform(infile, outfile, posting=90):
    par = ISPPar(infile + '.par')
    utm = UTM(infile + '.par')
    for item in [outfile, outfile+'.par']:
        if os.path.isfile(item):
            os.remove(item)
    falsenorthing = 10000000. if par.corner_lat < 0 else 0
    inlist = ['UTM', 'WGS84', 1, utm.zone, falsenorthing, os.path.basename(outfile), '', '', '', '', '', '-{0} {0}'.format(posting), '']
    process(['create_dem_par', outfile + '.par'], inlist=inlist)
    process(['dem_trans', infile + '.par', infile, outfile + '.par', outfile, '-', '-', '-', 1])
    hdr(outfile+'.par')
def transform ( infile , outfile , posting = 90 ) : par = ISPPar ( infile + '.par' ) utm = UTM ( infile + '.par' ) for item in [ outfile , outfile + '.par' ] : if os . path . isfile ( item ) : os . remove ( item ) falsenorthing = 10000000. if par . corner_lat < 0 else 0 inlist = [ 'UTM' , 'WGS84' , 1 , utm . zone , falsenorthing , os . path . basename ( outfile ) , '' , '' , '' , '' , '' , '-{0} {0}' . format ( posting ) , '' ] process ( [ 'create_dem_par' , outfile + '.par' ] , inlist = inlist ) process ( [ 'dem_trans' , infile + '.par' , infile , outfile + '.par' , outfile , '-' , '-' , '-' , 1 ] ) hdr ( outfile + '.par' )
transform SRTM DEM from EQA to UTM projection
transform SRTM DEM from EQA to UTM projection
"""
    transform SRTM DEM from EQA to UTM projection
    """ # read DEM parameter file # transform corner coordinate to UTM # determine false northing from parameter file coordinates # create new DEM parameter file with UTM projection details # transform dem
infile
outfile
posting