I'm trying to read a tile from the Sentinel1 SAR data collection. I'm using rioxarray to open the .tiff data file.
rioxarray.open_rasterio(
path_to_data,
overview_level=2,
parse_coordinates=True,
).astype(float).squeeze()
When the data is loaded I print it in a notebook cell and get it's size and type:
xarray.DataArray y:4172 x:6475
I want to only focus on an area of interest here and use coordinates of an area as indices. However, the array only accepts ints and is not indexed based on coordinates. Is there any way to use coordinates to access the DataArray? My goal is to only keep the area of interest not the whole tile, how can I do so?