I'm using the xarray package to load and access data of large GeoTIFF files (>50GB) and it is working flawless.
import xarray as xr
img = xr.open_rasterio("path/to/large_geo_tiff.tif")
pixel_value = img[0,1225, 4321]
print("The pixel value is: ", pixel_value.values.item())
However, I was wondering how xarray is actually loading large GeoTIFF files. Obviously it is not loading the whole file into memory since it would not fit but performs some kind of lazy loading. I'm only used to dask and Dask Arrays which split the data into chunks and allows for easy pixel-access by just loading the corresponding chunk into memory. But the signature of the function open_rasterio looks like the following
xarray.open_rasterio(filename, parse_coordinates=None, chunks=None, cache=None, lock=None)
Since I didn't define chunks the img should not be chunked. So my question is what happens when calling pixel_value = img[0,1225, 4321] and how can xarray access the pixel value at the given location so fast?
I look forward to any feedback.