centreborelli / s2p

Satellite Stereo Pipeline
GNU Affero General Public License v3.0
209 stars 67 forks source link

Check if a given window is full of nodata or 0. #139

Closed lionlai1989 closed 1 year ago

lionlai1989 commented 1 year ago

Dear the team of s2p: I would like to propose that discarding a tile full of nodata or 0 during the step of is_this_tile_useful in s2p/initialization.py. It's common that stereo imagery has valid data in the certain AOI and put the unconcerned area as nodata.
E.g., the following two scenes both have nodata pixels over some parts of area. And the current s2p will create tiles across the whole raster, including the area fill with nodata/0.

PREVIEW_PNEO4_202208140001556_PAN_SEN_PWOI_000028300_1_15_F_1

This PR provides two improvements:

Scene2:

Please review it and any feedback is appreciated. Thank you.

lionlai1989 commented 1 year ago

Hi @gfacciol: If your schedule permits, could you please look into this PR? I would appreciate your feedback on this matter. Thank you.

Best,

carlodef commented 1 year ago

Hi @lionlai1989, this looks good to me, thanks! I'll merge it as soon as the CI tests have finished

lionlai1989 commented 1 year ago

Thanks. :smile_cat: