source: subversion/applications/rendering/genericHeatmapRender/readme.txt @ 16116

Last change on this file since 16116 was 16116, checked in by stevefaeembra, 11 years ago

initial version.. very basic heatmapping code using Python/Matplotlib?

File size: 2.8 KB
Line 
1Introduction
2============
3
4This code was an attempt at generating 'most photographed' heatmaps using the flickR API.
5The code has been donated in the hope that the OpenStreetMap community can find uses for it in
6other projects. I've separated out the various functions (location gathering, plotting and KML).
7
8Currently the data source is flickR, and output pngs have *manually* been merged with OSM exports
9(or displayed in KML using the supplied class).
10
11However I hope to remedy this and download appropriate images from OSM, maybe using PIL to do the overlay.
12Any pointers welcome!
13
14I'm new to FOSS and OSM, so any style/coding suggestions are welcome :)
15
16Quick Tour
17==========
18Location.py - a generic 'point marker'
19
20locationFinder.py - responsible for generating a list of Location objects of interest.
21This is a generic class which should be sub-classed for other applications.
22
23locationFinder_flickr_locations.py - an example sub-class, implementing a flickR API geo query.
24(*Needs flickR API key*)
25
26heatmapPNGgenerator.py - generates a heatmap using matplotlib and a supplied locationFinder object.
27Saves png file to given location.
28
29KMLGenerator.py - given a locationFinder, a PNG file and a filename for the KML, saves a KML file with
30an image overlay and placemarkers for the individual locations.
31
32heatmappr.py is an end-to-end example/demo.
33
34Prerequisites
35=============
36
37These are the libraries you'll need to install
38your mileage may vary if you use older libs than this.
39
40Matplotlib 0.98.5.2 (http://matplotlib.sourceforge.net/users/installing.html)
41Numpy 1.3.0
42
43You'll need to be using Python 2.5 or later.
44
45If you wish to try using the example (which uses the flickR API) you will need
46to get yourself a flickR API key. If you're a flickR user, visit the following URL..
47
48http://www.flickr.com/services/api/keys/apply/
49
50..to apply for a key.
51
52Be careful not to commit a copy of locationFinder_flickr_locations.py with
53a copy of your API, as it this will breach the flickr api TOS.
54
55Known Issues
56============
57A number of asserts have been put in place to cope with known issues.
58
59Google Earth Issues with KML overlays
60========================
61My version of GE for testing is 5.0.11733.9347
62
63Sometimes, the photo overlay does not appear, but the pushpins do.
64
65If this happens, first try this:-
66
67[1] Right-click on the file in the places palette, then choose 'Revert'. This reloads the file.
68    You should also do this if you change the .kml file and want to see the changes in GE.
69[2] If that doesn't work, right click the file in places palette, and choose 'Delete'. This doesn't delete
70    the file, but simply removes it from the 'My Places' or 'My Temporary Places' folder.
71    Then open the file again.
72[3] If that doesn't work, try restarting GE.
Note: See TracBrowser for help on using the repository browser.