Changes between Version 15 and Version 16 of django_gheat


Ignore:
Timestamp:
May 2, 2011, 4:22:14 PM (14 years ago)
Author:
dennisw
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • django_gheat

    v15 v16  
    3333== Install django_gheat ==
    3434Get 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}}}
    3540
    3641Open {{{./settings.py}}}, look for the 'DATABASES' section and edit the following lines:
     
    5055Once you've entered the correct settings, you will be able to start Django.
    5156{{{
    52 # 'cd' to project root
    5357# The following command will add some standard Django tables and the tables defined in django_gheat/gheat/models.py to the database
    5458$ ./manage.py syncdb
    55 
    56 # if using sample page, first 'cd samples/persisted', will get fixed soon
    5759$ ./manage.py runserver
    5860}}}
     
    8991}}}
    9092
    91 == Importing .netxml ==
     93== Importing .csv ==
    9294
    93 There is a data import script for the .netxml file format:
     95There is a data import script for the .csv file format:
    9496{{{
    95 # 'cd' to project root
    9697# 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'
    9899# -m = name of the dataset, e.g. 'Walk in park' or 'Trip with boat'
    99100# -g = your name
    100101# -e = your email address
     102# -a = antenna
     103# -k = network card
    101104
    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>
    103106}}}
    104107
    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 }}}
     108Make sure the variables in this script match the column numbers in your file e.g.;
     109Lat 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]'.
     110Also, take note of the replace() and strip() functions. These should probably be edited aswell.
    119111
    120112== Prerender heatmap ==
    121113You can prerender a heatmap with the following command:
    122114{{{
    123 # 'cd' to project root
    124115$ ./manage.py gen_tiles
    125116}}}
     
    138129To display the heatmap, you can run the webserver:
    139130{{{
    140 $ cd samples/persisted
    141131$ ./manage.py runserver
    142132}}}
    143 Then browse to http://localhost:8000/home/
     133Then browse to http://localhost:8000/website/
    144134
    145135For now, for both the on-the-fly-render and the prerender, the heatmap images will be saved in (if windows; 'C:') '/tmp/gheat'.