# Grdtrack output format

**URL:** <https://forum.generic-mapping-tools.org/t/grdtrack-output-format/3299>\
**Category:** GMT.jl Q&A\
**Created:** [September 22, 2022, 1:52pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-output-format/3299 "2022-09-22T13:52:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wolkenloseswetter](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/wolkenloseswetter/32/2516_2.png) [@wolkenloseswetter](https://forum.generic-mapping-tools.org/u/wolkenloseswetter)\
**Post date:** [September 22, 2022, 1:52pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-output-format/3299/1 "2022-09-22T13:52:35Z")

</div>

Hi,

I use _grdtrack_ to extract grid points from a grid. The file with the grid points looks like this:

```
lon lat name altitude
7.4475 46.9480 Bern 540

```

Now, _grdtrack_ inserts the value from the grid **between** the **latitude** -column and **name** -column. Is it possible with an option that _grdtrack_ inserts the value from the grid at the end (after the altitude)?

Like this:

```
lon lat name altitude sample
7.4475 46.9480 Bern 540 0.8782911

```

I am using GMT 6.1.1. Under GMT 4.5.5 the value (sample) was added at the end of the line by default.

Thank you for the support!

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [September 22, 2022, 10:00pm UTC](https://forum.generic-mapping-tools.org/t/grdtrack-output-format/3299/2 "2022-09-22T22:00:10Z")

</div>

One big change from GMT 4 to 5 and 6 that is not backwards compatible is the handling of mixed data and text records. In GMT5 onwards we have a numerical column section followed by an optional text section. There are lots of reasons for this, not at least knowing column order (I you had Hong Kong as city then is that 2 columns?) as well as parsing. So your best approach is to ensure your data tables follow that format. As it is, the 540 is not seen as a number but part of the trailing text “Bern 540”.

---

<div class="post-metadata">

**Author:** ![wolkenloseswetter](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/wolkenloseswetter/32/2516_2.png) [@wolkenloseswetter](https://forum.generic-mapping-tools.org/u/wolkenloseswetter)\
**Post date:** [September 23, 2022, 6:01am UTC](https://forum.generic-mapping-tools.org/t/grdtrack-output-format/3299/3 "2022-09-23T06:01:44Z")

</div>

Thanks for the information pwessel! I will modify my analysis script.
