This is about Ch 7 notebook "Introduction to data structures in xarray".
In the very first code cell, the correct URL is constructed and then immediately overwritten to a string that is interpreted as a local filepath.
import xarray as xr
import rioxarray
bucket_url = "https://a3s.fi/swift/v1/AUTH_0914d8aff9684df589041a759b549fc2/PythonGIS"
url = bucket_url + "/elevation/kilimanjaro/ASTGTMV003_S03E036_dem.tif"
url = "data/temp/kilimanjaro_elevation.tif"
data = xr.open_dataset(url, engine="rasterio", masked=True)
data
Line 5 should be removed. With it, the xr.open_dataset call fails. Removing the line fixes it as the URL is defined correctly on the previous two lines.
This is about Ch 7 notebook "Introduction to data structures in xarray".
In the very first code cell, the correct URL is constructed and then immediately overwritten to a string that is interpreted as a local filepath.
Line 5 should be removed. With it, the
xr.open_datasetcall fails. Removing the line fixes it as the URL is defined correctly on the previous two lines.