gmt psxy [core] 6.1.0_8580087_2020.02.15 [64-bit] - Plot lines, polygons, and symbols in 2-D
I am attempting to plot a polygon that encompasses the South Pole in an orthographic projection and having a little trouble getting GMT to do this for me. Here’s an extract of the relevant code:
Running this script fails with the following error:
psxy(72558,0x109e8b5c0) malloc: *** error for object 0x7fadf8000000: pointer being freed was not allocated
psxy(72558,0x109e8b5c0) malloc: *** set a breakpoint in malloc_error_break to debug
lgmpoly_ortho.gmt: line 55: 72558 Abort trap: 6 psxy $icesheets -R -J -G$iceblue -fg -A -O -P -K >> $output
The offending GMT multisegment polygon file, “$icesheets” in my script, can be downloaded here (15 Mb).
Thinking that the problem could be with having a polygon that covers the pole, I also tried splitting the polygon up into 10x10 degree blocks. The plotting still fails, but now with a different error:
Assertion failed: ((fabs(A) > 5 * DBL_EPSILON) || (fabs(B) > 5 * DBL_EPSILON)), function doubleAlmostEqualUlps, file /Users/jkaplan/Downloads/gmt/gmt/src/common_math.c, line 208.
lgmpoly_ortho.gmt: line 56: 72593 Abort trap: 6 psxy $icesheets -R -J -G$iceblue -fg -A -O -P -K >> $output
Any ideas you might have to solve this problem would be much appreciated
Thanks in advance for your help!
If you could make avbailable some bits that lets me reproduce the problem then happy to give it a go. GMT usually plots polar caps well. Are they true polar cap or are their artificial excursions to the pole one or more points having coordinates equal to that of the pole?
which does not look like data but fake lines connecting the perimeter to the S pole. It may be that some tools like arcGIS or Google Earth requires thes fake line to function but for GMT they are not needed and just ends up being taken literally. You could try to search for these sections (probably just one) and remove the junk.