def copy_with(self, mutable=False, **kwargs):
        """Get a copy of this GeoRaster with some attributes changed. NOTE: image is shallow-copied!"""
        init_args = {'affine': self.affine, 'crs': self.crs, 'band_names': self.band_names, 'nodata': self.nodata_value}
        init_args.update(kwargs)

        # The image is a special case because we don't want to make a copy of a possibly big array
        # unless totally necessary
        if 'image' not in init_args and not self.not_loaded():
            init_args['image'] = self.image
        if mutable:
            _cls = MutableGeoRaster
        else:
            _cls = GeoRaster2

        return _cls(**init_args)
Get a copy of this GeoRaster with some attributes changed. NOTE: image is shallow-copied!