Intensity flag in grd2kml

Hello everyone,

I’ve got an error when trying to use grd2kml in GMT to visualise a shaded DEM on google earth.
This is the command i’ve used:

gmt grd2kml test.grd -Ntest -I+d 

And the output:

grd2kml [NOTICE]: Extended grid size is by 1024 by 1024, tile size is 512 x 512
grdimage [ERROR]: Option -Q: Cannot specify a transparent color for grids when intensities are also used
grd2kml [NOTICE]: Level 00: Tile size: 17.0667 x 17.0667 m Tiles: 1 by 1 = 1 1 mapped 0 empty [Gaussian filtered with -Fg0.00055555556 -I0.0005555555555555474]
grdimage [ERROR]: Option -Q: Cannot specify a transparent color for grids when intensities are also used
grdimage [ERROR]: Option -Q: Cannot specify a transparent color for grids when intensities are also used
grdimage [ERROR]: Option -Q: Cannot specify a transparent color for grids when intensities are also used
grdimage [ERROR]: Option -Q: Cannot specify a transparent color for grids when intensities are also used
grd2kml [NOTICE]: Level 01: Tile size: 8.53333 x 8.53333 m Tiles: 2 by 2 = 4 4 mapped 0 empty [Original grid used]
grd2kml [NOTICE]: Done: 5 tiles (0 JPG and 5 PNG) written to directory test

A different error when I tried in the GMT julia package but still related with grdimage:

grd2kml("test.grd", prefix="test", cmap=:earth, shade="+d")

output:

grd2kml [NOTICE]: Extended grid size is by 1024 by 1024, tile size is 512 x 512
grdimage [ERROR]: Option -A: No output argument allowed
grdimage [ERROR]: Option -A: Must provide an output filename for image
grd2kml [ERROR]: Unable to create a direct PNG from grid
ERROR: Something went wrong when calling the module. GMT error number = 79

I’d appreciate any help on this.
Thanks,
Simon

Hi,

Can you please provide a working example that we can reproduce?

Hi Joaquim,
The test.grd comes from the @earth_relief_01s cropped in a specific area, so it’s the topography.

gmt grdcut @earth_relief_01s -R39.81/40.08/8.905/9.08 -Gtest.grd

Thanks,
Simon

The julia command errored but the plain GMT worked fine (aside from a known bug on the Windows grdcut to create the grid.

C:\v>grd2kml test.grd -Ntest -I+d
grd2kml [NOTICE]: Extended grid size is by 1024 by 1024, tile size is 512 x 512
grd2kml [NOTICE]: Level 00: Tile size: 17.0667 x 17.0667 m Tiles:   1 by   1 =     1     1 mapped   0 empty [Gaussian filtered with -Fg0.00055555556 -I0.0005555555555555474]
grd2kml [NOTICE]: Level 01: Tile size: 8.53333 x 8.53333 m Tiles:   2 by   2 =     4     4 mapped   0 empty [Original grid used]
grd2kml [NOTICE]: Done: 5 tiles (0 JPG and 5 PNG) written to directory test