This small project contains a couple of python's scripts which from measured values of pollution calculate values of pollution "inside buildings". This is a goal of this project. The main method is based on bilinear interpolation.
Important notes:
- if the virtualenv, (basic usage) is installed skip step 1 below, otherwise install it
- some packages may depend on the order listed in requirements.txt or requirements_dev.txt
1. $ pip install virtualenv
2. ~/virtuals$ virtualenv city-pollution
3. $ source ~/virtuals/city-pollution/bin/activate
4. $ source .envs
5. $ git clone git@github.com:ondrej-tucek/city-pollution.git
6. $ cd city-pollution
7. $ python app/app.py examples/data_in/buildings.shp examples/data_in/concentration.dbf examples/data_out/new_buildings.shp examples/data_out/new_concentration.dbf
8. ... work now! ...
9. $ deactivate
Locations of measured pollution (red points).
Detail view, red points are locations of pollution, circles inside buildings are their centroids.
Because original mesh is irregular, we had to do a rectangular. Now we can use bilinear interpolation method. On the img below is only view on a piece of mesh.
Final result :)
$ py.test -s -v --cov=app/ --durations=5 --cov-report term-missing