Exemplo n.º 1
0
def exportSigFile(alg, group, subgroup, dest, sigDir='sig'):
    """
    Export a signature file from internal GRASSDB
    to final destination
    """
    shortSigFile = os.path.basename(dest)
    interSig = os.path.join(Grass7Utils.grassMapsetFolder(), 'PERMANENT',
                            'group', group, 'subgroup', subgroup, sigDir,
                            shortSigFile)
    moveFile(alg, interSig, dest)
    return interSig
Exemplo n.º 2
0
def importSigFile(alg, group, subgroup, src, sigDir='sig'):
    """
    Import a signature file into an
    internal GRASSDB folder
    """
    shortSigFile = os.path.basename(src)
    interSig = os.path.join(Grass7Utils.grassMapsetFolder(), 'PERMANENT',
                            'group', group, 'subgroup', subgroup, sigDir,
                            shortSigFile)
    copyFile(alg, src, interSig)
    return shortSigFile