Hello,
is there a way to get fragments of original Sentinel-2 images in UTM CRS?
When I configure receiving them in UTM I see that they were reprojected (from EPSG 4326?) and differ from original scenes obtained from Copernicus Dataspace.
The reprojection introduces errors…
Regards
Ints
If you use the same CRS as the one in the original image (i.e. UTM with the right datum), there is no reprojection happening. You should also make sure to align the grid correctly, but with UTM this is easy.
That is what I expected.
But somehow the images for Copernicus Dataspace and Sentinel-Hub differ.
See them at: Nextcloud
File “RigaC-20240511Shub.tiff” is obtained from Sentinel-Hub, the other one is extracted from the SAFE archive.
Both GeoTIFFs contain only 10 bands (10m and 20m resolution ones).
Request is as follows:
request =
‘{
“input”: {
“bounds”: {
“properties”: {
“crs”: “http://www.opengis.net/def/crs/EPSG/0/32635”
},
“bbox”: [
322510,
6315210,
324110,
6316120
]
},
“data”: [
{
“type”: “sentinel-2-l1c”,
“dataFilter”: {
“timeRange”: {
“from”: “2024-05-11T00:00:00Z”,
“to”: “2024-05-11T23:59:59Z”
}
}
}
]
},
“output”: {
“width”: 160,
“height”: 91,
“responses”: [
{
“identifier”: “default”,
“format”: {
“type”: “image/tiff”
}
}
]
}
}’
What could go wrong?
Ints
Checking these two samples, they seem same to me, pixels seem to be aligned, some random value as well.
What specifically should I see?
Sorry, I uploaded the wrong file- please compare ‘RigaC-20240511Snap.tiff’ with ‘RigaC-20240511Shub.tiff’ now.
Look at the bridge and you will notice distortions.
I was allowed to upload images now so you can see them below:
RigaC-20240511Snap.tiff (287.7 KB)
RigaC-20240511Shub.tiff (287.7 KB)
Just to double check - did you perhaps also compare the exact product, SAFE, directly imported in QGIS? Best to compare Sentinel Hub with that one, rather than something produced with SNAP.
If so, and you still see differences, do please send SAFE id.
Yes, sure, I did and it is fine in SNAP and QGIS:
S2A_MSIL1C_20240511T095031_N0510_R079_T35VLD_20240511T103438.SAFE
One thing I notice is the following:
“width”: 160,
“height”: 91,
The height of your area is 90, not 91. This might be an issue.
That said, how exactly do you see that “they were reprojected (from EPSG 4326?) and differ from original scenes”?
It seems that you are approaching the point.
To my understanding, the height is calculated from BBOX:
(6316120-6315210)/10 = 91
As to reprojection, that was just a guess.
I just saw the distortions and (apparently wrongly) assumed that they are the result of reprojection. Sorry for confusion.
Hello!
Any news about that?
Regards
Ints
mednieks@edi.lv
I do still not understand how to actually see that “they were reprojected (from EPSG 4326?) and differ from original scenes”?
Forget about reprojecting- that was my improper interpretation.
But there are geometric distortions, viewed well in extracted small test image.
Presumably, due to handling of image height.
You mentioned that height is 90, actually it is 91 as calculated from the bounding box.
What do you mean by “geometric distortions”? I did not see anything specific.
Please look at files “RigaC-20240511Shub.tiff” and “RigaC-20240511Snap.tiff” sent earlier (you can open those in QGIS) and notice the differences in the bridge area.
The bridge in “RigaC-20240511Snap.tiff” is straight but in the other file received from S-hub (or using Process API of Copernicus Dataspace) it is not (the images should be the same as both are fragments of the same Sentinel-2 UTM tile- without reprojection, as you mentioned).
We analyze the S-2 time series of a city on a pixel level, and it is important to get proper excerpts of a scene for the particular bbox).
If you check this area in EO Browser, you will notice that there are two products available on the same date:
Your request is set (as a default) for the “LATEST”, which means that the product
S2A_MSIL2A_20240511T095031_N0510_R079_T34VFJ_20240511T120151.SAFE
is used for the processing.
To avoid reprojection, you should therefore either change the CRS to EPSG:32634, or narrow the time range to:
"timeRange": {
"from": "2024-05-11T09:54:37Z",
"to": "2024-05-11T09:54:37Z"
}
I have done the latter and do get request processed without distortions.
I managed to get the proper image by manipulating the request.
Thank you!