greenwich/raster.py
def copy(self, source, dest):
        """Returns a copied Raster instance.

        Arguments:
        source -- the source Raster instance or filepath as str
        dest -- destination filepath as str
        """
        if not self.copyable:
            raise IOError('Driver does not support raster copying')
        if not isinstance(source, Raster):
            source = Raster(source)
            should_close = True
        else:
            should_close = False
        if source.name == dest:
            raise ValueError(
                'Input and output are the same location: %s' % source.name)
        settings = driverdict_tolist(self.settings)
        ds = self.CreateCopy(dest, source.ds, self.strictmode,
                             options=settings)
        if should_close:
            source.close()
        return Raster(ds)
def copy(self, source, dest):
        if not self.copyable:
            raise IOError('Driver does not support raster copying')
        if not isinstance(source, Raster):
            source = Raster(source)
            should_close = True
        else:
            should_close = False
        if source.name == dest:
            raise ValueError(
                'Input and output are the same location: %s' % source.name)
        settings = driverdict_tolist(self.settings)
        ds = self.CreateCopy(dest, source.ds, self.strictmode,
                             options=settings)
        if should_close:
            source.close()
        return Raster(ds)
def copy ( self , source , dest ) : if not self . copyable : raise IOError ( 'Driver does not support raster copying' ) if not isinstance ( source , Raster ) : source = Raster ( source ) should_close = True else : should_close = False if source . name == dest : raise ValueError ( 'Input and output are the same location: %s' % source . name ) settings = driverdict_tolist ( self . settings ) ds = self . CreateCopy ( dest , source . ds , self . strictmode , options = settings ) if should_close : source . close ( ) return Raster ( ds )
Returns a copied Raster instance.

        Arguments:
        source -- the source Raster instance or filepath as str
        dest -- destination filepath as str
Returns a copied Raster instance .