Bug #384

-JM error when using -JMlon0/lat0/scale

Added by Eduardo over 5 years ago. Updated about 5 years ago.

Status:ClosedStart date:2013-09-30
Priority:NormalDue date:
Assignee:-% Done:


Target version:Candidate for next bugfix release
Affected version:5.1.x Platform:Linux


gmt psbasemap -R0/360/-80/80 -JM0/0/15 -Ba30 > test.ps
gmt ps2raster -Tg test.ps

Error: /undefined in -nan
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_pop 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1173/1684(ro)(G)– --dict:0/20(G)– --dict:77/200(L)– --dict:148/250(L)–
Current allocation mode is local
Current file position is 19208
GPL Ghostscript 9.05: Unrecoverable error, exit code 1
ps2raster: System call [gs -q -dSAFER -dNOPAUSE -dBATCH -dUseFlateCompression=true -dPDFSETTINGS=/prepress -dEmbedAllFonts=true -dSubsetFonts=true -dMonoImageFilter=/FlateEncode -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dUseFastColor=true -sDEVICE=png16m -g2480x3509 -r300 -sOutputFile=test.png -f./ps2raster_17696d.eps] returned error 256.


#1 Updated by Eduardo over 5 years ago

Perhaps this was my mistake, using the central meridian in the border of the -R region.

This works:

gmt psbasemap -R-180/180/-80/80 -JM0/0/15 -Ba30 > test.ps
gmt ps2raster -Tg test.ps

#2 Updated by Paul over 5 years ago

  • Status changed from New to Feedback

Yes, this one is not trivial. For ps* plotting it is completely irrelevant as far as scaling etc is. For mapproject it is used to determine the origin. A fix for the latter is doable but the former may give dumb plot. I dont like to introduce fixes that depends on plotting versus projecting, so will think about this some more.

#3 Updated by Florian over 5 years ago

  • Target version changed from 5.1.0 to Candidate for next bugfix release

#4 Updated by Paul about 5 years ago

  • Status changed from Feedback to Resolved
  • Affected version changed from 5.x-dev to 5.1.x

I added a safety valve for badly chosen central longitudes: When map range is 360 and "central" longitude is either west or east boundary. In r12855.

#5 Updated by Eduardo about 5 years ago

Thanks, it works! Also to [-180, 180]

$ gmt psbasemap -R-180/180/-80/80 -JM180/0/15 -Ba30 > test.ps
psbasemap: Warning: Central meridian for global cylindrical projection had to be reset from 180 to 0

#6 Updated by Paul about 5 years ago

  • Status changed from Resolved to Closed

Closing this as fixed.

Also available in: Atom PDF