def run_test_on_real_rasters(self, zoom, resampling, local):
    results_arr = np.empty(shape=len(self.files), dtype=object)
    print(('*' * 80))
    print(zoom)
    print(('*' * 80))
    print(('#' * 80))
    print(resampling.name)
    print(('#' * 80))
    for (i, (file_type, file_url)) in enumerate(self.files.items()):
        if (local or ('split' in file_type)):
            base_url = './notebooks/'
        else:
            base_url = 'https://ariel.blob.core.windows.net/rastersfortest/'
        file_url = (base_url + file_url)
        if (local and ('mrf' not in file_type)):
            new_file = (file_url + self.random_string())
            os.system(('cp %s %s' % (file_url, new_file)))
        else:
            new_file = file_url
        print(('file type: %s' % file_type))
        print(('-' * 80))
        print(('file_url: %s' % file_url))
        print(('new_file: %s' % new_file))
        print(('-' * 80))
        vr = GeoRaster2.open(new_file)
        start = datetime.now()
        rasterio_ops = {'CPL_DEBUG': True, 'GDAL_DISABLE_READDIR_ON_OPEN': 'YES'}
        if ('mrf' not in file_type):
            rasterio_ops['CPL_VSIL_CURL_ALLOWED_EXTENSIONS'] = '.tif'
        with rasterio.Env(**rasterio_ops):
            vr.get_tile(*tiles[zoom], resampling=resampling)
        end = datetime.now()
        tt = ((end - start).total_seconds() * 1000)
        print(('stars time : %s end time: %s total: %s ms' % (start, end, tt)))
        results_arr[i] = ('type: %s, zoom: %i, resampling: %s time: %s msec' % (file_type, zoom, resampling.name, tt))
        if (local and ('mrf' not in file_type)):
            os.system(('rm -f %s' % new_file))
        print(('=' * 80))
    print(results_arr)
def run_test_on_real_rasters(self, zoom, resampling, local):
    results_arr = np.empty(shape=len(self.files), dtype=object)
    print(('*' * 80))
    print(zoom)
    print(('*' * 80))
    print(('#' * 80))
    print(resampling.name)
    print(('#' * 80))
    for (i, (file_type, file_url)) in enumerate(self.files.items()):
        if (local or ('split' in file_type)):
            base_url = './notebooks/'
        else:
            base_url = 'https://ariel.blob.core.windows.net/rastersfortest/'
        file_url = (base_url + file_url)
        if (local and ('mrf' not in file_type)):
            new_file = (file_url + self.random_string())
            os.system(('cp %s %s' % (file_url, new_file)))
        else:
            new_file = file_url
        print(('file type: %s' % file_type))
        print(('-' * 80))
        print(('file_url: %s' % file_url))
        print(('new_file: %s' % new_file))
        print(('-' * 80))
        vr = GeoRaster2.open(new_file)
        start = datetime.now()
        rasterio_ops = {'CPL_DEBUG': True, 'GDAL_DISABLE_READDIR_ON_OPEN': 'YES'}
        if ('mrf' not in file_type):
            rasterio_ops['CPL_VSIL_CURL_ALLOWED_EXTENSIONS'] = '.tif'
        with rasterio.Env(**rasterio_ops):
            vr.get_tile(*tiles[zoom], resampling=resampling)
        end = datetime.now()
        tt = ((end - start).total_seconds() * 1000)
        print(('stars time : %s end time: %s total: %s ms' % (start, end, tt)))
        results_arr[i] = ('type: %s, zoom: %i, resampling: %s time: %s msec' % (file_type, zoom, resampling.name, tt))
        if (local and ('mrf' not in file_type)):
            os.system(('rm -f %s' % new_file))
        print(('=' * 80))
    print(results_arr)