-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8070ee8
commit d6e8c23
Showing
6 changed files
with
189,766 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,30 @@ | ||
# pedestrian | ||
Project for data visualization seminar at HSE | ||
# Simple model of pedestrian traffic | ||
|
||
By Yaroslav Sergienko. | ||
|
||
## Description | ||
|
||
Firstly, XML dump of target area is loaded from Open Street Map. After that raster map of pedestrian zones is generated. Examples of zones: footways, crosswalks, roads, grass, buildings, fence, water, gates (public or private). Each zone has corresponding cost of passing. And finally Dijkstra algorithm is applied to calculate shortest paths to some point, for example, subway station. This allows to calculate all shortest pedestrian paths from all buildings. | ||
|
||
## Files | ||
|
||
* `aeroport.osm` --- XML map downloaded from OSM. | ||
* `map2matrix.ipynb` --- Jupyter notebook, which generates `map.png` and `map.pgm` from `aeroport.osm`. | ||
* `map.pgm` --- raster in binary format without header, just pixel values, one byte per pixel; width and height are provided through command-line. | ||
* `map.png` --- png of previous file with zones encoded with colors for debug. | ||
* `calc_paths.c` --- C source of program, which calculates shortest paths. | ||
|
||
## Calculating paths | ||
|
||
Invocation: | ||
|
||
``` | ||
gcc calc_paths.c | ||
echo "2700 2100 1107 1021" | ./a.out | ||
``` | ||
|
||
The program expects input in the following format: | ||
`width height cx cy`, where `width` and `height` are | ||
width and height of the raster image `map.pgm`, `cx` and `cy` are | ||
the (pixel) coordinates target point for path calculation. | ||
|
Oops, something went wrong.