Bug #754

mapproject with input binary files

Added by John about 2 years ago. Updated almost 2 years ago.

Status:ClosedStart date:2015-08-19
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next bugfix release
Affected version:5.x-svn Platform:Mac OS X

Description

Seems that there may be an issue when attempting to read-in a binary file with mapproject. Response is: "Column selected for latitude-formatting has values that exceed +/- 90; set to NaN"

Example. First create a little data set with lon,lat coordinates, e.g.,

-45 67
-33 71
-47 73

save it as t.txt.

Next, use gmtconvert to create a binary file: gmtconvert t.txt -bo2d > t.bin

Now set the following parameters:

j_param="s-45/90/70/1:1" 
r_paramtr="-180/180/30/90" 

When t.txt is read-in by mapproject, everything works fine, you get (as expected):

gmt mapproject t.txt -J${j_param} -R${r_paramtr} -F -C -fg
0    -2.52418e+06    
431734    -2.03115e+06    
-64726.3    -1.85352e+06

When t.bin is read-in by mapproject, you get:

gmt mapproject t.bin -J${j_param} -R${r_paramtr} -F -C -bi2d -fg
mapproject: Column selected for latitude-formatting has values that exceed +/- 90; set to NaN
0    NaN
mapproject: Column selected for latitude-formatting has values that exceed +/- 90; set to NaN
94.4169    NaN
mapproject: Column selected for latitude-formatting has values that exceed +/- 90; set to NaN
73.7021    NaN

Using version: Version 5.1.3_r14762

Thanks - John

Associated revisions

Revision 14763
Added by Paul about 2 years ago

Give warning if -fg is used for output, see issue #754

History

#1 Updated by Paul about 2 years ago

  • Status changed from New to Resolved

The -fg is short for -fig and -fog so you are in effect overriding the Cartesian output format with -fog. In fact, no -fg is needed since -J is provided and mapproject knows what to do. I'll see why the ascii case worked though.

#2 Updated by John about 2 years ago

Ha! I should of known better! You're right; remove the -fg and everything works properly.

#3 Updated by Paul about 2 years ago

  • Assignee set to Paul
  • Target version set to Candidate for next bugfix release
  • % Done changed from 0 to 100

I added a warning and override in r14764.

#4 Updated by Paul almost 2 years ago

  • Status changed from Resolved to Closed

Closed as fixed.

Also available in: Atom PDF