Problem filling polygons - banding across the map
|Target version:||Candidate for next bugfix release|
I'm having problems using psxy to fill polygons that encompass the poles. No problems drawing the outlines, just filling using -G. I've also tried using gmtspatial to clip at the map boundary first, this helps a bit.
I'm using Version 5.3.0_r16840 [64-bit].
Attached is a sample script, two different .gmt files (exported from GPlates) that both cause problems, and two maps to show the difference between using gmtspatial and just using psxy. Hope these help.
A fix was made last year, which did help, but I guess not in all cases.
#1 Updated by Paul almost 4 years ago
- Status changed from New to In Progress
- Assignee set to Paul
- Target version set to Candidate for next bugfix release
Thanks, I found polygons 31, 49, and 78 caused the wrapping and wrote a test script (test/psxy/badpols.sh) showing these failures. It has been added to our test suite (it currently fails, of course) and we will work on fixing this problem. This is a bit different that what I fixed earlier in that the map region is not global but regional, and somehow this now fails.
#3 Updated by Kara over 3 years ago
- File 20161212_testing_polar_polygons.zip added
I just checked out the latest version in the repository (r17378) and ran a few scripts that had previously caused me problems. The plotting looks great and I couldn't see any banding at the poles!! Thank you!!
One thing I thought to note <see attached files>... With certain input files (e.g. 203Ma.xy), the attached script seems to hang without finishing. A ps file is created - which I can indeed open, but it seems that a basemap isn't drawn. Yet when I use v5.2.1_r15220 there are no such problems. This same script works on other input files (e.g. 200 Ma). This probably isn't major, but I thought to flag it.
#4 Updated by Paul over 3 years ago
Interesting. Nasty polygon crosses very close to the pole and hence the longitude changes too rapidly even after resampling. I added finer resampling when close to poles and it seems to work so far, but I suspect if a polygon crosses within inches of the pole then it may not be enough. Give it a try; in r17528.