Bug #1096

grdimage error: wrong dimensions when using auto generated shade, -I

Added by Andreas 7 days ago. Updated 2 days ago.

Status:ResolvedStart date:2017-05-15
Priority:NormalDue date:
Assignee:Paul% Done:

100%

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

Description

When using the new auto shading, -I, GMT complains that the Dimensions of intensity grid do not match that of the data grid!

E.g

grdimage -I gebco_8m.nc -P -JS21/90/10c -R10/68/50/80r -K  1>plot.ps
grdimage: Dimensions of intensity grid do not match that of the data grid!

Also see forum post, http://gmt.soest.hawaii.edu/boards/1/topics/5288

Using GMT Version 5.4.1 (r18203) on Windows 10.

plot.bat (64 Bytes) Andreas, 2017-05-15 08:24

gebco_8m.nc (14 MB) Andreas, 2017-05-15 08:25

Associated revisions

Revision 18228
Added by Paul 2 days ago

Addressing issue #1096

Revision 18229
Added by Paul 2 days ago

Add test based on issue #1096

Revision 18230
Added by Paul 2 days ago

Finish issue #1096 in grdview as well

History

#1 Updated by Andreas 7 days ago

But it does work when using GMTs auto downloadable relief grids;

grdimage -I earth_relief_10m.grd -R-10/34/57/81 -JS3/90/10c -Bafg -P > plot.ps

#2 Updated by Joaquim 7 days ago

That's because the -R must have triggered a grdcut and so no -R in the grdimage command.
We must wait for Paul's contribution to this issue (he's traveling). The failure is due to this line (L538) in grdimage.c

if (GMT→common.R.active[RSET] && !GMT→common.R.oblique) { strcat (cmd, " R"); strcat (cmd, GMT>common.R.string); }

where the GMT→common.R.oblique prevented the -R string to to sent to gdrgradient and so both grids ended up with different sizes (like error message states). Don;t know why that condition is there so will not remove it for now.

#3 Updated by Joaquim 7 days ago

  • Status changed from New to In Progress

#4 Updated by Paul 2 days ago

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

Redid how this is done in grdview and grdimage. Passes all tests plus new tests autointensity.sh based on the above example for both image and view. In r18231.

Also available in: Atom PDF