change geotiff data to lat lon python

895 Views Asked by At

Hello I have obtained a geotiff with flood risk data, I need to show on map and also get it values querying lat,lon.

import rasterio
from rasterio.plot import show
raster = rasterio.open('/content/geonode_fp_flood_category.tif')
show(raster) #show image
raster.profile #show profile

enter image description here

Opening the file in python with rasterio give me this information raster.profile:

{'driver': 'GTiff', 'dtype': 'int16', 'nodata': -32768.0, 'width': 2952, 'height': 4070, 'count': 1, 'crs': CRS.from_epsg(32616), 'transform': Affine(90.98088343224933, 0.0, 255612.775997,
   0.0, -90.98088343243249, 2052554.35523), 'tiled': False, 'interleave': 'band'}

I know the data is not in the desired lat,lon projection but I cannot find the way to generate a new geotiff in that coordinate system (lat,lon) or if rasterio is the right tool for this. Thanks for any help

0

There are 0 best solutions below