diff --git a/workshop/jupyter/content/data/README.md b/workshop/jupyter/content/data/README.md index db558e8..6fcad3d 100644 --- a/workshop/jupyter/content/data/README.md +++ b/workshop/jupyter/content/data/README.md @@ -17,6 +17,8 @@ and sometimes also GeoJSON. NB "Antarctica" has been removed from the "countries" datasets as it gave problems with reprojections... -The poi-timis.geojson dataset has been downloaded from geofabrik.de, then filtered -on certain types and bounds. Data provided by Open Street Map Editors under the +`sample_geozarr.zarr.zip` has been produced in the scope of this training using numpy with random numbers. + +`poi-timis.geojson` has been downloaded from geofabrik.de, then filtered +on certain types and bounds. Data provided by OpenStreetMap editors under the Open Database License (ODbL) 1.0. diff --git a/workshop/jupyter/content/data/sample_geozarr.zarr.zip b/workshop/jupyter/content/data/sample_geozarr.zarr.zip new file mode 100644 index 0000000..96c6ae9 Binary files /dev/null and b/workshop/jupyter/content/data/sample_geozarr.zarr.zip differ diff --git a/workshop/jupyter/content/notebooks/05-raster-data.ipynb b/workshop/jupyter/content/notebooks/05-raster-data.ipynb index 13159a2..cb2c494 100644 --- a/workshop/jupyter/content/notebooks/05-raster-data.ipynb +++ b/workshop/jupyter/content/notebooks/05-raster-data.ipynb @@ -92,6 +92,27 @@ "r = plt.imshow(ds.GetRasterBand(1).ReadAsArray())\n" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "GDAL supports a wide variety of input format, and can also combine it with virtual filesystems, such as within a zipfile" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from osgeo import gdal\n", + "import matplotlib.pyplot as plt\n", + "# Notice how the zarr file is referenced within the zip file\n", + "raster_path = '/vsizip/../data/sample_geozarr.zarr.zip/sample_geozarr.zarr'\n", + "dataset = gdal.Open(raster_path)\n", + "r = plt.imshow(ds.GetRasterBand(1).ReadAsArray())\n" + ] + }, { "cell_type": "markdown", "metadata": {},