https://github.com/developmentseed/async-geotiff
import os
try:
!uv pip install async-geotiff obstore
from google.colab import auth, userdata
auth.authenticate_user()
os.environ["PROJECT_ID"] = userdata.get("PROJECT_ID")
except:
pass
from obstore.store import GCSStore
from async_geotiff import GeoTIFF, Window
store = GCSStore(
bucket="alphaearth_foundations",
client_options={
"default_headers": {
"x-goog-user-project": os.environ.get("PROJECT_ID")
}
}
)
path = "satellite_embedding/v1/annual/2017/18N/xnkew8ex3gr3kxuve-0000000000-0000000000.tiff"
geotiff = await GeoTIFF.open(path, store=store)
overview = geotiff.overviews[9] # 8x8 pixels, Resolution: 10240.00m x 10240.00m
geotiff.count # 64
array = await overview.read()