-
Notifications
You must be signed in to change notification settings - Fork 4
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
Failure to compute cell boundary in geographic coordinates #6
Comments
The same issue happens with other cells, e.g., "R88888" |
I'll chase this, it seems to work at higher resolutions and then bails when the fifth level is reached. This may be related to something that Matt mentioned that his team fixed in the GA's version, so I'll check what they did in their repo. |
Yes. This is the same issue identified in AusPIX. It appears to be due to a projection issue at the boundary between the equatorial and polar cells (where the equal area projection switches). I've tested this at multiple resolutions (down to level 15) and the error occurs only in the northern most vertices (for the south polar cell) and the southern most vertices (for the north polar cell). The work around for this bug that was implemented by GA is as follows:
NB: This is not a proper fix for the issue - merely a work around. A proper fix will require an examination of the polar projection algorithm used by rHealPIX and determine why it is getting an "out of bounds" error when converting from planar (cube face) coordinates to global (lon/lat) coordinates. It could be a boundary computation issue, which might be solved by extending the projection boundary slightly. But the work hasn't been done yet. Cheers, |
Occasionally a computed cell vertex would be up to 1e15 outside the cell. This was allowed for by expanding the rhealpix/healpix boundary vertices by (eps = 1e15) in the in_rhealpix_image test. But the test for applying combine_triangles in rhealpix didnt accomodate a +-eps dither in coordinate values. combine_triangles() cannot know the origin of the coordinate it is testing, but cell.vertices() & cell.boundary() already know the region of the cell that owns the coordinates. So adding cell.region() as an optional argument to the rheal[ix transformation functions, allows vertices() & boundaries() to force the combine_triangles() behaviour to follow the cell, not the individual coordinates. This has been tested for cells with all 0s, 1s, 2s, 6s, 7s, or 8s on faces OPQR. ie equatorial cells with a northern or southern border on the edge of the equatorial region.
I can confirm those two cells compute properly now. But only after the source code is updated as described in #10 |
The following simple test script fails with an error:
resulting in:
Hope I have the right version of rHEALPix, installed it using:
sudo pip3 install --upgrade rhealpixdggs
and then run the test script using python3.
The text was updated successfully, but these errors were encountered: