# There is a strange line on my map, is it a bug from grdimage?

**URL:** <https://forum.generic-mapping-tools.org/t/there-is-a-strange-line-on-my-map-is-it-a-bug-from-grdimage/2883>\
**Category:** Q&A\
**Created:** [May 6, 2022, 2:05am UTC](https://forum.generic-mapping-tools.org/t/there-is-a-strange-line-on-my-map-is-it-a-bug-from-grdimage/2883 "2022-05-06T02:05:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sidiq](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sidiq](https://forum.generic-mapping-tools.org/u/sidiq)\
**Post date:** [May 6, 2022, 2:05am UTC](https://forum.generic-mapping-tools.org/t/there-is-a-strange-line-on-my-map-is-it-a-bug-from-grdimage/2883/1 "2022-05-06T02:05:18Z")

</div>

Hi, I found a strange line on my map. Is it a bug on grdimage? I used grdgradient and grdimage on my code. I also tried to convert it to png, jpg, and pdf, but the line still remains. Can anyone help me? Thank you

 ![stange line](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/f/fefb8ac1413cb3019b601e4ffab1d48855482d70.jpeg)

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [May 6, 2022, 7:04am UTC](https://forum.generic-mapping-tools.org/t/there-is-a-strange-line-on-my-map-is-it-a-bug-from-grdimage/2883/2 "2022-05-06T07:04:06Z")

</div>

Are you able to create a minimal working exmaple (see pr. 4 [here](https://flint.soest.hawaii.edu/t/forum-tips-tricks-create-a-good-post/2585)) and post the code?

---

<div class="post-metadata">

**Author:** ![sidiq](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sidiq](https://forum.generic-mapping-tools.org/u/sidiq)\
**Post date:** [May 6, 2022, 7:26am UTC](https://forum.generic-mapping-tools.org/t/there-is-a-strange-line-on-my-map-is-it-a-bug-from-grdimage/2883/3 "2022-05-06T07:26:58Z")

</div>

Oh ya sorry

I use topography and bathymetry data from gebco. Here is the code

gmt begin biak png  
gmt grdgradient gebco\_indojepang.grd -A0 -Nt -Giluminasi.nc  
gmt makecpt -Cgebco  
gmt psbasemap -JM7 -R131.0065/141.3786/-4.0658/0.9679 -Ba2f1 --MAP\_FRAME\_TYPE=plain --MAP\_FRAME\_PEN=1p --FONT\_ANNOT\_PRIMARY=4p --MAP\_TICK\_LENGTH\_PRIMARY=3p --FORMAT\_GEO\_MAP=ddd.xF  
gmt grdimage gebco\_indojepang.grd -Iiluminasi.nc -JM  
gmt coast -W0.1p -Dh  
gmt psxy Molucca\_fault.gmt -Wblack  
gmt psxy trench.gmt -W0.3 -Sf0.3/0.03+l+t -Gblack  
gmt end show

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [May 6, 2022, 7:59am UTC](https://forum.generic-mapping-tools.org/t/there-is-a-strange-line-on-my-map-is-it-a-bug-from-grdimage/2883/4 "2022-05-06T07:59:14Z")

</div>

Thanks.

I’m not getting that line. Assuming it’s not caused by `Molucca_fault.gmt` or `trench.gmt`; I don’t have those. I also use `@earth_relief_10m` instead of your `gebco_indojepang.grd`.

```auto
gmt begin biak png
  gmt grdgradient @earth_relief_10m -A0 -Nt -Giluminasi.nc
  gmt makecpt -Cgebco
  gmt psbasemap -JM7 -R131.0065/141.3786/-4.0658/0.9679 -Ba2f1 --MAP_FRAME_TYPE=plain --MAP_FRAME_PEN=1p --FONT_ANNOT_PRIMARY=4p --MAP_TICK_LENGTH_PRIMARY=3p --FORMAT_GEO_MAP=ddd.xF
  gmt grdimage @earth_relief_10m -Iiluminasi.nc -JM
  gmt coast -W0.1p -Dh
gmt end show

```

 ![biak](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/c/c1a4f49f927f7de50de6f3dbbe099587ffc04151.png)

Which version are you using?

---

<div class="post-metadata">

**Author:** ![sidiq](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sidiq](https://forum.generic-mapping-tools.org/u/sidiq)\
**Post date:** [May 6, 2022, 9:03am UTC](https://forum.generic-mapping-tools.org/t/there-is-a-strange-line-on-my-map-is-it-a-bug-from-grdimage/2883/5 "2022-05-06T09:03:01Z")

</div>

After I see your picture and there is no strange line, I assume that there is an error with my bathymetry data. I try to open it on qgis and I find that the gebco\_indojepang.grd data is error. I think it is because of the converting process from tiff to .grd. Then I try to redownload the same gebco data and finally, there is no strange line. Thank you for your help

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [May 6, 2022, 10:14am UTC](https://forum.generic-mapping-tools.org/t/there-is-a-strange-line-on-my-map-is-it-a-bug-from-grdimage/2883/6 "2022-05-06T10:14:02Z")

</div>

Very good!

Remember that gmt very conveniently offers remote datasets; see e.g. [GMT Remote Datasets Documentation](https://www.generic-mapping-tools.org/remote-datasets/) (that’s the `@earth_relief_10m` in my code).

---

<div class="post-metadata">

**Author:** ![sidiq](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sidiq](https://forum.generic-mapping-tools.org/u/sidiq)\
**Post date:** [May 6, 2022, 11:09am UTC](https://forum.generic-mapping-tools.org/t/there-is-a-strange-line-on-my-map-is-it-a-bug-from-grdimage/2883/7 "2022-05-06T11:09:11Z")

</div>

ok thx, I will try it
