Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Charis,
First of all thanks for sharing the code, the work looks great!
I found a bug in the test script
s2_tiles_supres.py
and wanted to contribute with a fix.The problem is that when you superresolve only a part of the image (let's say roi_x_y='500,500,2500,2500') the output image has the origin upperleft coordinates equal to the ones in original image, while it should have ori_coord + (500,500).
Let me show you with some images, as it's going to be clearer.
Original code
python s2_tiles_supres.py path_to_xml output_file.tif --roi_x_y "0,0,2500,2500"
python s2_tiles_supres.py path_to_xml output_file.tif --roi_x_y "500,500,2500,2500"
After the changes in this pull request
python s2_tiles_supres.py path_to_xml output_file.tif --roi_x_y "500,500,2500,2500"
I just started using gdal but I hope this fixes the issue.
Thanks again,
Ignacio