plot GEOTIFFs using grdimage

Added by Andreas 3 months ago

Hi all,

I am using 5.4.0_r17381 and try to plot a global GEOTIFF file as a background image. In particular I used the Blue Marble GEOTIFFs available here:

Depending on the chosen projection and the utilized parameters I get some strange results.

For example (all example outputs are attached):
grdimage -JN0/10c -B0 -N -D BlueMarbleNG-TB_2004-08-01_rgb_1440x720.TIFF >

works as expected, while the image is clipped if lon0 is changed:
grdimage -J90/10c -B0 -N -D BlueMarbleNG-TB_2004-08-01_rgb_1440x720.TIFF >

Using an orthographic projections gives the following behaviour: Setting the projection center to 0/0 gives a completely distorted result (consisting just of horizontal stripes):
grdimage -JG0/0/10c -B0 -N -D BlueMarbleNG-TB_2004-08-01_rgb_1440x720.TIFF >,

while only half of the image is displayed correctly if lon0 is changed to a value different from 0:
grdimage -JG90/0/10c -B0 -N -D BlueMarbleNG-TB_2004-08-01_rgb_1440x720.TIFF >

By the way, I observe a similar behaviour when using the corresponding png file in combination with -Dr and -Rd.

Has anyone successfully used grdimage for plotting GEOTIFFS or is there any known issue? Any help is appreciated.

Thanks a lot,

Andreas (26.1 KB) (1.61 MB) (1.99 MB) (2.24 MB)

Replies (2)

RE: plot GEOTIFFs using grdimage - Added by Paul 3 months ago

Thanks for these Andreas. Turned out we have forgotten to set a grdtype variable when reading an image and thus the entire decision on wrapping around failed. Try r19488 trunk, your cases works for me now.

RE: plot GEOTIFFs using grdimage - Added by Andreas 3 months ago

Thanks for fixing it that fast. Works perfectly now.