Repack testfile.tar.gz without volume label for portability
[gpstools.git] / doc / to_postgres.txt
blobe6b4ee1f8870ab1cbd652443cffe5fcf8f4f154e
1 til_postgres.txt
2 File ID: 0529a718-fafb-11dd-b55f-000475e441b9
4 Creating the "gps" database:
6   $ cd ~/bin/src/gpstools/postgres
7   $ ./init.sh
9 Copy new things from new tracklogs into Postgres:
11   1: chdir to the place where the new files are.
12   1: Run "svn update" and delete all files already in the system.
13   1: addpoints *.gpx
15   2: cd ~/gps/div/postgres
16   2: psql gps
17   2: \i update_things.sql
19   And then there’s the place names:
21   1: cd ~/gps/poi/trans
22   1: svn update, etc
23   1: gpst -o pgwupd *.gpx | psql -X -a gps
24   1: cd ~/gps/unit
25   1: svn update, etc
26   1: gpst -o pgwupd wpdata.gpx | psql -X -a gps
28 To add new waypoints:
30 Execute
32   $ addpoints -t waypoint -v *.gpx
33   $ psql gps
34   gps=# SELECT loop_wayp_new();
36 To clean up the waypoints:
38 cd ~/bin/src/gpstools/postgres
39 psql gps
40 \i cleanup.sql
42 To synchronise waypoints and POI:
44 Postgres is necessary. You need a database called "gps" and a table called 
45 "tmpwayp", which is taken care of by ../postgres/create_table.sql . After that, 
46 execute ../poisync and edit the .gpx files.
48 A useful macro to use inside vimdiff when wpdata.gpx is in the left window and 
49 the receiving file is in the right, is:
51 :map <f3> ?<wpt <cr>V/<\/wpt><cr>y<C-w><C-w>GP:%!poiformat<cr>:diffu<cr><C-w><C-w><C-o>
52 :map <f3> V/<\/wpt><cr>y<C-w><C-w>GP:%!poiformat<cr>:diffu<cr><C-w><C-w><C-o>
54 (Press F1 while between <wpt></wpt>.)
56 vim: set ts=2 sts=2 sw=2 et :