Skip to main content

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 nMath.max(0, Math.log(VV) * 0.21714724095 + 1), dataMask];

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

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

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

I am saving the response in this manner:

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

Hi,

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.


Reply