# Dr Jones fligth to Venice in his Last Crusade

**URL:** <https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004>\
**Category:** Q&A\
**Created:** [August 18, 2021, 3:36am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004 "2021-08-18T03:36:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [August 18, 2021, 3:36am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/1 "2021-08-18T03:36:06Z")

</div>

I made an animation of a flight from New York to Venice.

I also have a question. How can I remove the effect (jittery?) of the front of the line? I try with -H2,4,8 and changing the resolution (DPU) without luck. Any idea/suggestion?

[![](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/4/45c4c6b1ba8f9152f93ae8b214260120b3030144.jpeg "Animation of Indiana Jones flight New York-Venice.") ](https://www.youtube.com/watch?v=JDCDMg1NIk4)

Full script (I am amazed on how few lines are needed).

```
#!/usr/bin/env bash
DPU=1080p

title=Anim_Jones_$DPU

cat << 'EOF' > pre.sh
gmt begin

# Escalas del viaje
cat << 'FILE' > cities.txt
40.711913, -74.007135, New York
47.561598, -52.712229, St Johns (Terranova)
37.741556, -25.696368, Sao Miguel (Azores)
38.775808, -9.135406, Lisboa (Portugal)
45.502971, 12.342151, Venecia (Italia)
FILE
    gmt sample1d "cities.txt" -I10.66k -fg -i1,0 | gmt mapproject -G+uk > "temp_timefile.txt"

#	Convertir linea para graficar
    gmt events -Rd "temp_timefile.txt" -Ar${MOVIE_DPU} > temp_line_points.txt
gmt end
EOF

cat << 'EOF' > main.sh
gmt begin
    gmt coast -R-800/800/-450/450+uk -JG${MOVIE_COL0}/${MOVIE_COL1}/24c -Bg0 -Yc -Xc -Df -G200 -Sdodgerblue2 -N1/0.2,-
    gmt events temp_line_points.txt -Ar -T${MOVIE_COL2} -Es -W2p,red
gmt end
EOF

#	Movie: Crear figuras y animacion. Opciones C: Canvas Size. G: Color fondo.
gmt movie "main.sh" -Sb"pre.sh" -N$title -T"temp_timefile.txt" -C$DPU -Vi -Ml,png -Fmp4

```

---

<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:** [August 18, 2021, 3:49am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/2 "2021-08-18T03:49:44Z")

</div>

This is wonderful, @Esteban82 ! Just so I understand, by jittery here you mean the red line growing in short spurts and not smoothly and continuously as the rest? My guess (without trying anything) is that the line is not sampled finely enough?

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [August 18, 2021, 3:56am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/3 "2021-08-18T03:56:00Z")

</div>

Ok. Yes, exactly that. I will play with the sample.

Do you mean the line created with `sample1d` or the one with `events`?

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [August 18, 2021, 3:57am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/4 "2021-08-18T03:57:20Z")

</div>

By the way, I also try a flight from San Francisco to Nepal and something weird happened to the line.

[![](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/d/d05a12a5ffaad78be3c547b7c62035fe2c686e35.jpeg "Dr Jones flight to Nepal.") ](https://www.youtube.com/watch?v=ori1HHjwpag)

---

<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:** [August 18, 2021, 4:18am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/5 "2021-08-18T04:18:41Z")

</div>

Don’t know, I would try to change one at the time to see if it makes any difference. How did you pick 10.66k?

The Nepal one I suspect has a date line issue. Does it look like that if you just make a static plot of all of the temp\_timefile.txt or temp\_line\_points.txt?

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [August 18, 2021, 4:25am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/6 "2021-08-18T04:25:33Z")

</div>

I pick 10.66k to get a 30 seconds animation (so I could add the a cut of the movie soundtrack).

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [August 18, 2021, 10:02pm UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/7 "2021-08-18T22:02:51Z")

</div>

> [@pwessel](#):
>
> The Nepal one I suspect has a date line issue. Does it look like that if you just make a static plot of all of the temp\_timefile.txt or temp\_line\_points.txt?

I’m afraid I don’t quite understand the question.

---

<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:** [August 18, 2021, 10:21pm UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/8 "2021-08-18T22:21:15Z")

</div>

Sorry, it was a bit rambling. What I mean was this.

Make a global map of each of those two files with gmt plot. Do any of them look similarly bad? Plot them as points I guess.

---

<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:** [August 18, 2021, 11:10pm UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/9 "2021-08-18T23:10:25Z")

</div>

So I tested the output from **sample1d** and **mapproject** and they both are fine. Then I did **events** and it worked fine to make the final file. So I think the input files are OK. So things go wrong inside the **movie** loop over frames. Since you posted everything I will take this a bit further and fine a master frame that breaks down. BTW, I thought having the DPU being 1080p and not 1080 was the problem but it did not care there, but not sure if movie parses it the same way. So try removing the ‘p’ and see if there is any change.

---

<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:** [August 18, 2021, 11:13pm UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/10 "2021-08-18T23:13:50Z")

</div>

Sorry, 1080p is fine in both cases. I need coffee…

---

<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:** [August 18, 2021, 11:18pm UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/11 "2021-08-18T23:18:49Z")

</div>

I ran your first Venice movie and while there might be a tiny bit of jittery in my local result it is not anything like the jittery in the youtube posting. Does it run jittery if you play it locally on your computer?

---

<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:** [August 18, 2021, 11:19pm UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/12 "2021-08-18T23:19:51Z")

</div>

Can you post the cities coordinates file you used for the Nepal trek?

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [August 19, 2021, 12:16am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/13 "2021-08-19T00:16:42Z")

</div>

```
#!/usr/bin/env bash
title=Anim_Jones_Hemisferico

cat << 'EOF' > pre.sh
gmt begin

# Escalas del viaje
cat << 'FILE' > cities.txt
-122.416389	37.7775 San Francisco
-157.9225	21.318611	Honolulu
121.019722	14.508333	Manila
85.358889	27.696389	Katmandu
FILE
    gmt sample1d "cities.txt" -I22.7k -fg | gmt mapproject -G+uk > "temp_timefile.txt"

#	Convertir linea para graficar
    gmt events -Rd "temp_timefile.txt" -Ar100c > temp_line_points.txt
gmt end
EOF

cat << 'EOF' > main.sh
gmt begin
    gmt coast -Rd -JG${MOVIE_COL0}/${MOVIE_COL1}/15c -Bg0 -Yc -Xc -Da -G200 -Sdodgerblue2 -N1/0.2,-
    gmt events temp_line_points.txt -Ar -T${MOVIE_COL2} -Es -W2p,red
gmt end
EOF

#	Movie: Crear figuras y animacion. Opciones C: Canvas Size. G: Color fondo.
	gmt movie "main.sh" -Sb"pre.sh" -N$title -T"temp_timefile.txt" -C15cx15cx100 -Vi -M100,png -Gblack -Zs -Fmp4
```

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [August 19, 2021, 12:49am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/14 "2021-08-19T00:49:57Z")

</div>

It would be possible that there is problem in the segment between Honolulu and Manila? Here I plot a line between them without interpolation.

 ![Anim_Jones_Hemisferico_200](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/b/bdfe0d9531d085674b7cb60eb58fec1c1deb5016.png)

---

<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:** [August 19, 2021, 1:12am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/15 "2021-08-19T01:12:57Z")

</div>

Gmt should select the shortest path. This is the long path, no?

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [August 19, 2021, 2:06am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/16 "2021-08-19T02:06:32Z")

</div>

Yes, it is.

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [August 19, 2021, 2:19am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/17 "2021-08-19T02:19:57Z")

</div>

I found an issue. The following script gives this. The red line created by `gmt events -Ar100c -JW0/15c’ follows the long path.

 ![BUG_Events](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/3/31ed62b63124053c68cf9bcd19b39695b4711598.png)

```
#!/usr/bin/env bash
title=BUG_Events

cat << 'EOF' > pre.sh
gmt begin
# Escalas del viaje
cat << 'FILE' > cities.txt
185 0 1
175 0 2
FILE
    gmt events -Rd "cities.txt" -Ar100c > temp_line_points.txt -JW0/15c
    gmt events -Rd "cities.txt" -Ar100c > temp_line_points2.txt -JW180/15c
gmt end
EOF
cat << 'EOF' > main.sh
gmt begin
    gmt coast -Rd -JW180/15c -Bg0 -Yc -Xc -Dc -G200 -Sdodgerblue2 -N1/0.2,-
    gmt plot temp_line_points.txt -W2p,red
    gmt plot temp_line_points2.txt -W2p,black
gmt end
EOF
#	Movie: Crear figuras y animacion. Opciones C: Canvas Size. G: Color fondo.
	gmt movie "main.sh" -Sb"pre.sh" -N$title -T2 -C15cx15cx100 -Vi -Ml,png -Gblack

```

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [August 19, 2021, 2:33am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/18 "2021-08-19T02:33:38Z")

</div>

Now it works. I use the following command (I add -JG-185/0/15c). I wonder what would happens is the lines goes on the west up to San Francisco. The same issue would appear again?

```
gmt events -Rd "temp_timefile.txt" -JG-185/0/15c -Ar100c > temp_line_points.txt

```

 ![Anim_Jones_Hemis3](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/f/f86948b9511c38021a89bc058afe1fd1e1228afb.png)

---

<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:** [August 19, 2021, 2:36am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/19 "2021-08-19T02:36:47Z")

</div>

I think that if the -J changes in the movie you need to rerun events -Ardpi. Since yours do, you should put that command into the main.sh script.

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [August 19, 2021, 2:38am UTC](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004/20 "2021-08-19T02:38:22Z")

</div>

Ok. I will try it.

[Next page](https://forum.generic-mapping-tools.org/t/dr-jones-fligth-to-venice-in-his-last-crusade/2004.md?page=2)
