Loosing GEO Data when Downloading From Sentinel Hub

Hi
When I’m using the Python package to Download Tiff from Sentinel Hub,I am receiving a response ,a Tiff ,with no Geo data.
However ,when I am using the same request with Request Builder UI, I get the file with Geo data.

What am I missing here?
Code is below

evalscript = """
//VERSION=3
// displays VV in decibels from -20 to 0
// the following is simplified below
// var log = 10 * Math.log(VV) / Math.LN10;
// var val = Math.max(0, (log + 20) / 20);

return [Math.max(0, Math.log(VV) * 0.21714724095 + 1), dataMask];

"""
bbox = BBox(bbox=[  36,42,36.218004,42.14], crs=CRS.WGS84)

request = SentinelHubRequest(
    evalscript=evalscript,
    input_data=[
        SentinelHubRequest.input_data(
            data_collection=DataCollection.SENTINEL1_IW,          
            time_interval=('2024-01-01', '2024-02-01'),          
        ),
    ],
    responses=[
        SentinelHubRequest.output_response('default', MimeType.TIFF),
    ],
    bbox=bbox,
    size=[512, 598.193],
    config=config
)

response = request.get_data()
================================================

I am saving the response in this manner:

image = response[0]
image = image[:, :, 0]
plt.imshow(image)
#save file 
plt.imsave("./test.tiff",image)

Hi Jaket,

I encourage you to follow the example notebook in the Python package documentation. This will give you a deeper understanding of the correct methods to request and download data correctly using the Sentinel Hub API. In particular this example. You should then be able to apply the same method to your use case.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.