Hi I am researching to complete a project.
The aim is by given a coordinate I can extract the image amongs the raster files.
How do I check if the coordinate that I have for example (51.3334198, 3.2973934)
is in a raster image file - k_01.tif? If this coordinate is indeed in k_01.tif, how do I extract a small part of if i.e NxN window?
My code:
import rasterio
src = rasterio.open('k_01.tif')
src.bound
BoundingBox(left=145000.0, bottom=238000.0, right=162000.0, top=247000.0)
src.crs
CRS.from_epsg(31370)
Any ideas? Thanks in advance.
To check if a location (lat,long) is within the raster image's boundary.
then, you can use (x,y) to check with the
src.bound
To slice part of the array.