Changes between Version 15 and Version 16 of django_gheat
- Timestamp:
- May 2, 2011, 4:22:14 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
django_gheat
v15 v16 33 33 == Install django_gheat == 34 34 Get the latest django_gheat from the [http://svn.wirelessleiden.nl/svn/projects/Heatmap/src/ repository] 35 {{{ 36 # cd to where you want 'django_gheat' to be located 37 $ svn co http://svn.wirelessleiden.nl/svn/projects/Heatmap/src/django_gheat/ 38 $ cd django_gheat/ 39 }}} 35 40 36 41 Open {{{./settings.py}}}, look for the 'DATABASES' section and edit the following lines: … … 50 55 Once you've entered the correct settings, you will be able to start Django. 51 56 {{{ 52 # 'cd' to project root53 57 # The following command will add some standard Django tables and the tables defined in django_gheat/gheat/models.py to the database 54 58 $ ./manage.py syncdb 55 56 # if using sample page, first 'cd samples/persisted', will get fixed soon57 59 $ ./manage.py runserver 58 60 }}} … … 89 91 }}} 90 92 91 == Importing . netxml==93 == Importing .csv == 92 94 93 There is a data import script for the . netxmlfile format:95 There is a data import script for the .csv file format: 94 96 {{{ 95 # 'cd' to project root96 97 # In theory, only the -f option is needed, but for overview's sake, please use the others aswell. 97 # -f = location of the . netxml, e.g. '/home/test.netxml'98 # -f = location of the .csv, e.g. '/home/test.csv' 98 99 # -m = name of the dataset, e.g. 'Walk in park' or 'Trip with boat' 99 100 # -g = your name 100 101 # -e = your email address 102 # -a = antenna 103 # -k = network card 101 104 102 $ ./manage.py dataimport -f <file location> -m <dataset name> -g <username> -e <email>105 $ ./manage.py import_csv -f <file location> -m <dataset name> -g <username> -e <email> -a <antenna> -k <network card> 103 106 }}} 104 107 105 When importing .netxml, be sure your file has atleast the following parent/child xml elements: 106 {{{ 107 <wireless-network> 108 <SSID> 109 <encryption> </encryption> 110 <essid cloaked=""> </essid> 111 </SSID> 112 <BSSID> </BSSID> 113 <gps-info> 114 <min-lat> </min-lat> 115 <min-lon> </min-lon> 116 </gps-info> 117 </wireless-network> 118 }}} 108 Make sure the variables in this script match the column numbers in your file e.g.; 109 Lat is read from the first column [0], if the lat in your file is in the 4th column, change 'lat = row[0]' to 'lat = row[3]'. 110 Also, take note of the replace() and strip() functions. These should probably be edited aswell. 119 111 120 112 == Prerender heatmap == 121 113 You can prerender a heatmap with the following command: 122 114 {{{ 123 # 'cd' to project root124 115 $ ./manage.py gen_tiles 125 116 }}} … … 138 129 To display the heatmap, you can run the webserver: 139 130 {{{ 140 $ cd samples/persisted141 131 $ ./manage.py runserver 142 132 }}} 143 Then browse to http://localhost:8000/ home/133 Then browse to http://localhost:8000/website/ 144 134 145 135 For now, for both the on-the-fly-render and the prerender, the heatmap images will be saved in (if windows; 'C:') '/tmp/gheat'.