-
Notifications
You must be signed in to change notification settings - Fork 16
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
Cop 30m WGS84 ellipsoidal height correction is failing at the Anti-meridian (Antarctica) #102
Comments
I'm at the end of my workday so just noting my findings here. There appears to be two separate issues:
I think the missing data on the right side is due to the extent of the geoid that is being applied. The s3://aria-geoid/egm08_25.tif (referenced in the dem-stitcher code here) has the following extent: ![]() The EGM2008 2.5' geoid model that can be accessed here appears to have identical values but a larger extent with an extra pixel at the border of the right side of the antimeridian (180) ![]() Therefore, I think the values in the dem to the right of the antimeridian are being coverted to nodata, as there is missing data in the egm08_25.tif geoid file. Perhaps the geoid file should be updated?
I think this is due to the antimeridian crossing check here. Because the dem extent is slightly outside of the WGS84 range (+180,-180), it attempts to split the extent across the antimeridian, resulting in two extents, one of which is very small. Given the extent of the geoid is (-180.0208333333333428, 180.0208333333332860) these values could be used here instead when the function is called here. i.e. for the geoid dateline crossing check, change: if (xmin > -180) and (xmax < 180): to if (xmin > -180.0208333333333428) and (xmax < 180.020833333333286): This solved the issue for me with the Let me know if this is not clear, I can raise a PR tomorrow with some code changes that might be easier to follow. Thanks! |
Thank you so much for the detailed explanation as well as the reproducible calls. Will have to look at it over the course of this week. Sounds like Issue #100 might solve this if the buffered geoid does resolve this in this anti-meridian area. At some point today - I am going to upload both the 2.5 and 1 degree geoids from agi-soft to our s3 bucket and share the links here. The quickest fix would be to swap out the geoid hardcoded here: https://github.com/ACCESS-Cloud-Based-InSAR/dem-stitcher/blob/dev/dem_stitcher/geoid.py#L14-L19 I still think there might be a bug in the code though with respect to this based on what you are saying. This probably has all come to pass because of the issue here: #96 So to be clear, we were using the 1 degree geoid from agisoft, but it went down previously and that's "no bueno". Thank you again. |
It's taking some time on my part - sorry for the delay. I uploaded the geoids (both 1 and 2.5 degrees) to the ARIA bucket. I will create a PR and inspect it tomorrow (hopefully) or maybe Thursday. They file names are:
Where I used Feel free to check too. Thanks again. |
Hi @cmarshak no problem at all, I have a working implementation in the meantime. There are a number of other DEM handling steps our team are doing in order to get the desired format for our sentinel-1 processing. I am thinking it could make sense to add these directly to the dem-stitcher software. Other users may have the same requirements. I might raise a feature suggestion over the next week or two to discuss if your team is open to this? |
That's good to hear. Thanks for your patience. We use this software for our ARIA-S1-GUNWs, which are actively being processed and distributed via the DAAC. We don't have to worry about the anti-meridian issue you raise because ISCE2, which is what we use for the INSAR processing, does not work on the antimeridian anyways :) - see isce-framework/isce2#634 Definitely want to address exposing the geoid parameter as mentioned in the issue above to allow other users to BYOG ('bring your own geoid'). The other bugs will take some time to address. |
I had some time to fix some of the outstanding issues after months of neglect. I (think) I now understand the issue. It's because the read from both "ends" of the dateline causes For concreteness:
When I took care of the dateline initially, I was using the agi-soft geoid (2nd url) which has >=1 pixel buffer around both sides of the dateline. However the AGI soft geoid went down for an extended period (see #96) and swapped it out with the first. The AGI soft has since gone back up and it is now mirrored on our ARIA bucket. Indeed if there is missing data near the dateline, the process for dealing with dateline crossing (reading from both ends of the dateline) causes issues because all nodata is cast to So, the way I am planning on dealing with this is:
Will likely release these fixes in the coming weeks. Thanks again for your thorough documentation of this issue! |
The bug
WGS84 Ellipsoidal height correction (
dst_ellipsoidal_height = True
) at the anti-meridian is failing on the antarctic coastline.To Reproduce
requirements
Query the coordinates of a scene known to cross the antimeridian in Antarctica using the asf-search package:
Note this scene crosses the antimeridian. However, it is a valid polygon that extends the width of the earth so it is not handled by the dem-stitcher software. If we were to pass the bounds of this to the
stitch_dem
function it will attempt to download a large number of tiles.Manually split the geometry to a set of bounds to the left and right of the antimeridian:
Download the left dem using dem-stitcher with
dst_ellipsoidal_height = True
Note, if we set
dst_ellipsoidal_height = False
the dem will download as expected.In the case of the right side of the antimeridian with
dst_ellipsoidal_height = True
, the function will work but the dem has some missing data near the antimeridian compared to the case wheredst_ellipsoidal_height = False
(see image below)I'm guessing this has something to do with the coverage of the geoid?
Additional context
I am processing sentinel-1 scenes over Antarctica and acquiring the cop 30m using the dem-stitcher software. This issue has occurred at the antimeridian, elsewhere the dem acquisition is working as expected
The text was updated successfully, but these errors were encountered: