Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

area2point.fix_geotiff_locations unexpectedly sets noDataValue=0 #232

Open
asjohnston-asf opened this issue Jan 15, 2021 · 2 comments
Open
Labels
bug Something isn't working

Comments

@asjohnston-asf
Copy link
Member

This function is used by GAMMA RTC to translate all output rasters from pixel as area to pixel as point after RTC processing is completed: https://github.com/ASFHyP3/hyp3-gamma/blob/develop/hyp3_gamma/rtc/rtc_sentinel.py#L342

fix_geotiff_locations() overwrites any existing noDataValue and sets it to 0: https://github.com/ASFHyP3/hyp3-lib/blob/develop/hyp3lib/area2point.py#L33 .

This is a particular issue for DEM output files, which may have valid pixel values of zeros. For example, for an RTC image over death valley (S1A_IW_GRDH_1SDV_20201002T135151_20201002T135216_034618_0407ED_A3FB), the DEM packaged with the output has a clear ring of no data pixels where the terrain transitions from above sea level to below sea level. fix_geotiff_locations() should be modified to only convert from pixel as area to pixel as point, and any noDataValue business logic should reside elsewhere.

Screenshot from 2021-01-14 17-02-26

@asjohnston-asf asjohnston-asf added the bug Something isn't working label Jan 15, 2021
@rudigens
Copy link
Contributor

Very good call, Andrew. I have thought about this issue for a while but could not come up with an efficient way how to fix it. Might want to have another discussion with everybody around about what our options are. The cleanest way would actually to fix this in the DEM tiles but it is a lot of work and not that trivial to get it right at the coastlines.

@talogan
Copy link
Contributor

talogan commented Jan 16, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants