# Intensity flag in grd2kml

**URL:** https://forum.generic-mapping-tools.org/t/intensity-flag-in-grd2kml/6141
**Category:** Q&A
**Created:** [July 28, 2025, 5:41pm UTC](https://forum.generic-mapping-tools.org/t/intensity-flag-in-grd2kml/6141 "2025-07-28T17:41:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![simonst7](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/simonst7/32/1321_2.png) [@simonst7](https://forum.generic-mapping-tools.org/u/simonst7)
#### Post date: [July 28, 2025, 5:41pm UTC](https://forum.generic-mapping-tools.org/t/intensity-flag-in-grd2kml/6141/1 "2025-07-28T17:41:05Z")

</div>

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:

```auto
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** :

```auto
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

---

<div class="post-metadata">

### Author: ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)
#### Post date: [July 29, 2025, 2:03pm UTC](https://forum.generic-mapping-tools.org/t/intensity-flag-in-grd2kml/6141/2 "2025-07-29T14:03:48Z")

</div>

Hi,

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

---

<div class="post-metadata">

### Author: ![simonst7](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/simonst7/32/1321_2.png) [@simonst7](https://forum.generic-mapping-tools.org/u/simonst7)
#### Post date: [August 1, 2025, 11:41am UTC](https://forum.generic-mapping-tools.org/t/intensity-flag-in-grd2kml/6141/3 "2025-08-01T11:41:46Z")

</div>

Hi Joaquim,  
The **test.grd** comes from the @earth\_relief\_01s cropped in a specific area, so it’s the topography.

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

```

Thanks,  
Simon

---

<div class="post-metadata">

### Author: ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)
#### Post date: [August 1, 2025, 7:45pm UTC](https://forum.generic-mapping-tools.org/t/intensity-flag-in-grd2kml/6141/4 "2025-08-01T19:45:46Z")

</div>

> [@simonst7](#):
>
> `grd2kml("test.grd", prefix="test", cmap=:earth, shade="+d")`

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

```auto
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

```
