Re: Geotiff max/min coordinates question

Alan Snow

I am not entirely sure what you are referring to, but I am assuming you want the bounds of the raster in lat/lon?
If so, then `EPSG:4326` is a pretty standard projection for lat/lon coordinates.
So, you would need to transform your bounds to lat/lon or EPSG:4326.

If this is the case, then this should work:

import rasterio
from rasterio.warp import transform_bounds

with"file.tif") as rds:
    wgs84_bounds = transform_bounds(, "epsg:4326", *rds.bounds)

If not, are you able to share a snipped of the GDAL python code you used?

Join to automatically receive all group messages.