''

def __init__(self, layer, filename, resample='cubic', maskband=0):

    self.layer = layer
    fileurl = urljoin(layer.config.dirpath, filename)
    (scheme, h, file_path, p, q, f) = urlparse(fileurl)
    if (scheme not in ('', 'file')):
        raise Exception(('GDAL    file    must    be    on    the    local    filesystem,    not:    ' + fileurl))
    if (resample not in resamplings):
        raise Exception(('Resample    must    be    "cubic",    "linear",    or    "nearest",    not:    ' + resample))
    self.filename = file_path
    self.resample = resamplings[resample]
    self.maskband = maskband
