~ubuntu-branches/ubuntu/quantal/marble/quantal

« back to all changes in this revision

Viewing changes to data/placemarks/HOWTO-cities.txt

  • Committer: Bazaar Package Importer
  • Author(s): Philip Muškovac
  • Date: 2011-07-11 15:43:02 UTC
  • Revision ID: james.westby@ubuntu.com-20110711154302-lq69ftcx125g1jx5
Tags: upstream-4.6.90+repack
Import upstream version 4.6.90+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
If you apply changes to our city database please follow these steps:
 
2
 
 
3
As a translator please just edit cities.txt! If you edit the KML file directly your changes will get overwritten on the next change!
 
4
All other steps are optional and can be done by one of our programmers:
 
5
 
 
6
1. Compile marble/tools/asc2kml by executing "qmake-qt4 && make"
 
7
 
 
8
2. Prepare cities.txt as follows:
 
9
 
 
10
If you're interested only in the n cities with the highest population, you can generate a modified cities.txt like this (here n=1000):
 
11
 
 
12
tackat@tackat-laptop:~$ sort -t"$(echo -e "\t")" -n -k 15 cities.txt | tail -n 1000 > cities_largest_1000.txt
 
13
 
 
14
Then use cities_largest_1000.txt instead of cities.txt.
 
15
 
 
16
Be sure data is sorted alphabetically, otherwise there is a big perfomance hit when loading the files at startup.
 
17
For that, run:
 
18
 
 
19
tackat@tackat-laptop:~$ sort -t"$(echo -e "\t")" -k 2 cities.txt > cities_sorted.txt
 
20
 
 
21
2. Execute the resulting binary:
 
22
 
 
23
tackat@tackat-laptop:~/marble/tools/asc2kml$ ./asc2kml -o ~/marble/data/placemarks/cityplacemarks.kml ~/marble/data/placemarks/cities_sorted.txt  ~/marble/data/placemarks/statecodes.txt ~/marble/data/placemarks/timeZones.txt
 
24
 
 
25
 
 
26
3. Create the placemark-directory in your home directory if it doesn't exist already.
 
27
 
 
28
tackat@tackat-laptop:~$ mkdir ~/.local/share/marble/placemarks
 
29
 
 
30
4. Copy the new KML file over
 
31
 
 
32
tackat@tackat-laptop:~$ cp ~/marble/data/placemarks/cityplacemarks.kml ~/.local/share/marble/placemarks/cityplacemarks.kml
 
33
 
 
34
5. Delete the cityplacemarks cache file in the system directory:
 
35
 
 
36
tackat@tackat-laptop:~$ sudo rm /usr/local/share/apps/marble/data/placemarks/cityplacemarks.cache
 
37
 
 
38
6. Run Marble. Check that Marble will import the new data and generate a cache file. Look for the message:
 
39
 
 
40
No recent Default Placemark Cache File available!
 
41
Making cache for "cityplacemarks"
 
42
 
 
43
7. Copy the resulting cache file over to your sources:
 
44
 
 
45
tackat@tackat-laptop:~$ cp ~/.local/share/marble/placemarks/cityplacemarks.cache ~/marble/data/placemarks/cityplacemarks.cache
 
46
 
 
47
8. Commit the new cityplacemarks.cache to SVN.