carpentries-incubator / geospatial-python

Introduction to Geospatial Raster and Vector Data with Python
https://carpentries-incubator.github.io/geospatial-python/
Other
159 stars 57 forks source link

ep6 v1 earth search #141

Closed rbavery closed 1 year ago

rbavery commented 1 year ago

@fnattino less updates here, but curious what you think of showing the thumbnail given that the orientation of this asset doesn't match the raster bands. It replaced the overview asset we were using with v0

maybe instead we want to introduce this earlier, reading the actual COG overviews with rioxarray?

rioxarray.open_rasterio(cog_url, masked=True, overview_level=7)

this also comes up in episode 8.

Trying things out a bit more, I think overview_level 3 not he visual asset is the way to go. For other bands, we'll need to select a different overview level if we want to demonstrate overviews since not all have 3 levels (nir09 has only 2).

raster_overview = rioxarray.open_rasterio(items[1].assets["visual"].href, overview_level=3)
print(raster_overview.shape)
(3, 687, 687)
fnattino commented 1 year ago

Hi @rbavery, apologies for the late reply. Indeed, the overview asset is not present anymore, and it would be great to show here already how to access an overview of the true color image via overview_level. I see this has not yet been implemented, and the "overview" asset is still mentioned in the material, so I will raise an issue to remember fixing this.