Skip to main content

Hi there,


Attached are two screenshots corresponding to 1) A automatically downloaded band8-Sentinel2L1C image corresponding to my own bbox coordinates. 2) A manually downloaded whole tile (also band 😎 zoomed into the same region.


What can hopefully be seen are the dirt/ash layers in ice that should run smoothly as seen ath the 2nd image. The first image has distortion in even though they are both the same resolution (10 by 10 meters) and I don’t need to perform any up or downsampling.


If you switch between the two images, the ‘‘layers’’ of distorted pixels emerge. The question is if it is still possible to download in the same quality as if done manually.


Please find the request part of my script also attached below (cannot attach as a .py file)


Am I missing something?/Is there a way to let the system know that I want no interpolation to be done to my output at all and obtain it in a raw format.


Indeed I think that is a projection issue, however I am using the only possible syntax in the script for WGS84 -EPSG 4326 (ID of this CRS), so projection should not be an issue (since my manually downloaded tile is also in CRSWGS84.


Teo


INSTANCE_ID =


import matplotlib.pyplot as plt

import numpy as np

from sentinelhub import AwsProductRequest, AwsTileRequest, AwsTile

from sentinelhub import WmsRequest, WcsRequest, MimeType, CRS, BBox

import datetime


from sentinelhub import WebFeatureService, BBox, CRS, DataSource


for source in DataSource:

print(source)
#volcano_bbox = BBox(bbox=B(-2217485.0, 9228907.0), (-2150692.0, 9284045.0)], crs=CRS.POP_WEB)

Skeidararjokull = BBox(bbox=B-17.5, 64, -16.98, 64.32], crs=CRS.WGS84) #-7.885, 38.540, -7.870, 38.560-lower left coordinate pair followed by upper right pair #-7.885,38.540,-7.870,38.560


from sentinelhub import CustomUrlParam


wcs_true_color_request = WcsRequest(data_folder=‘e8’, #comma separated at each instance

layer=‘SENTINELBAND8’,

bbox=Skeidararjokull,

time=(‘2017-08-20’),

#resx=‘10m’, resy=‘10m’,

image_format=MimeType.TIFF,

instance_id=INSTANCE_ID)

#custom_url_params={CustomUrlParam.ATMFILTER: ‘ATM’})


wcssentinelband8 = wcs_true_color_request.get_data(save_data=True)


I am not familiar with the Python package (I believe someone from the team will respond to that as well) but if you want to get “raw” data, you need to:


  • Use the same CRS as the images are stored in (you can find this information by using WFS request, in your case it is EPSG:32628. When changing the CRS, you obviously need to also convert BBOX coordinates in the same CRS.

  • Align the BBOX so that pixels fit exactly with the original image.

  • Set resolution to 10m (for B08 in Sentinel-2)

    In such way there is no need for any interpolation and we simply pass the data.

I suggest you also check this post:
https://www.sentinel-hub.com/faq/how-can-i-get-original-reflectance-data-satellite


Hi Teodor,


I agree with @gmilcinski - the distortion happens because image is projected from UTM to WGS84 and your bounding box in WGS84 in is not completely aligned with original pixels in UTM.


By the way, sentinelhub Python package also supports all UTM coordinate reference systems. In your case you would have to use CRS.UTM_28N.


Reply