Advertisement
Guest User

Untitled

a guest
Jun 19th, 2016
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. cat << EOF
  4. <?xml version="1.0" encoding="UTF-8"?>
  5. <gpx creator="mapy.cz" version="1.1" xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
  6.   <trk>
  7.     <name>tanvald-pruned</name>
  8.     <number>1</number>
  9.     <trkseg>
  10. EOF
  11.  
  12. while read line; do
  13.   lat=`echo "$line" | cut -d " " -f 3`
  14.   lon=`echo "$line" | cut -d " " -f 4`
  15.   echo "<trkpt lat=\"$lat\" lon=\"$lon\"></trkpt>"
  16. done
  17.  
  18. cat << EOF
  19.  
  20.     </trkseg>
  21.   </trk>
  22. </gpx>
  23. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement