0

I have a Sentinel 2 multidate image data set and I'm trying to resample all of them at 10m and then stack them to apply a cloud mask, in Python language. Being new to programming, I have a hard time getting started. By cons I have some ideas like:   - recover the coordinates (x, y) of one of the 4 spectral bands at 10m (B2, B3, B4 or B8) and apply them on all the other bands of the multidate images. The fact is that the ultimate goal is to create an atlas, so I also asked the question of whether to create a stack for each image in a function, but it looks very complicated. ..

2
  • use gdal warp gdal.Warp('outputRaster.tif', 'inputRaster.tif', xRes=10, yRes=10)
    – Leo
    Commented Nov 2, 2019 at 13:08
  • 1
    @Leo Nice comment, any chance you can add it as an answer so we have a better chance of resolving this question?
    – Aaron
    Commented Nov 3, 2019 at 6:33

1 Answer 1

1

As you did not provide any code, it is hard to tell how far you are in the implementation. I assume, you already have all the libraries you need and that your data is in tif format. If so, I would recommend using gdal warp function to resample the tifs.

gdal.Warp('outputRaster.tif', 'inputRaster.tif', xRes=10, yRes=10)

there is no need to stack them for applying a cloud mask. you can just apply one after another.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.