def tif_bounds(): import rasterio import pyproj import numpy as np filepath = 'sample_GRE.TIF' with rasterio.open(filepath) as src: utm = pyproj.Proj(src.crs) lonlat = pyproj.Proj(init='epsg:4326') east,north = pyproj.transform(lonlat,utm,lon,lat) row,col =src.index(east,north) print(row) print(col) return row,col