Blob Blame History Raw
From fe8259c549993aac5909e756a4bfcd507a32c5d1 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 15 Mar 2019 22:31:18 -0400
Subject: [PATCH 1/4] DOC: Don't download RGB.byte.tif during build.

Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
 doc/gallery/plot_rasterio.py     | 7 -------
 doc/gallery/plot_rasterio_rgb.py | 7 -------
 2 files changed, 14 deletions(-)

diff --git a/doc/gallery/plot_rasterio.py b/doc/gallery/plot_rasterio.py
index 98801990..cfddb2a0 100644
--- a/doc/gallery/plot_rasterio.py
+++ b/doc/gallery/plot_rasterio.py
@@ -17,7 +17,6 @@ original map projection (see :ref:`recipes.rasterio_rgb`).
 """
 
 import os
-import urllib.request
 
 import cartopy.crs as ccrs
 import matplotlib.pyplot as plt
@@ -26,9 +25,6 @@ from rasterio.warp import transform
 
 import xarray as xr
 
-# Download the file from rasterio's repository
-url = 'https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif'
-urllib.request.urlretrieve(url, 'RGB.byte.tif')
 
 # Read the data
 da = xr.open_rasterio('RGB.byte.tif')
@@ -54,6 +50,3 @@ greyscale.plot(ax=ax, x='lon', y='lat', transform=ccrs.PlateCarree(),
                cmap='Greys_r', add_colorbar=False)
 ax.coastlines('10m', color='r')
 plt.show()
-
-# Delete the file
-os.remove('RGB.byte.tif')
diff --git a/doc/gallery/plot_rasterio_rgb.py b/doc/gallery/plot_rasterio_rgb.py
index 2733bf14..e842758e 100644
--- a/doc/gallery/plot_rasterio_rgb.py
+++ b/doc/gallery/plot_rasterio_rgb.py
@@ -14,16 +14,12 @@ transformation.
 """
 
 import os
-import urllib.request
 
 import cartopy.crs as ccrs
 import matplotlib.pyplot as plt
 
 import xarray as xr
 
-# Download the file from rasterio's repository
-url = 'https://github.com/mapbox/rasterio/raw/master/tests/data/RGB.byte.tif'
-urllib.request.urlretrieve(url, 'RGB.byte.tif')
 
 # Read the data
 da = xr.open_rasterio('RGB.byte.tif')
@@ -37,6 +33,3 @@ ax = plt.subplot(projection=crs)
 da.plot.imshow(ax=ax, rgb='band', transform=crs)
 ax.coastlines('10m', color='r')
 plt.show()
-
-# Delete the file
-os.remove('RGB.byte.tif')
-- 
2.20.1