Skip to content
Everton Constantino edited this page Feb 4, 2017 · 3 revisions

Pre-requisites

You need two sets of GIS files, the roads files must contain the roads as line segments or polygons only, the other files must contain the points you want to calculate the index.

Building and running

For now all you need to do is contained inside the README file and the run.sh script, I hope the use is sufficiently straightforward for an average linux user.

Output of visibility computation

The get_chunks part of the project generate a set of edges around each point that represent the visibility of that point with maximum radius defined on the configuration file. The program will spit two types of files the <OUTPUT_DIR>/points_<OUTPUT_PREFIX> and <OUTPUT_DIR>/chunks<OUTPUT_PREFIX>_ where <OUTPUT_DIR> and <OUTPUT_PREFIX> are taken from the configuration file, ranges from 0 to the amount of points read on the points GIS file and another all so you can check the roads read.

The points file that is outputed is just a list of X,Y coordinates one line for each point read (the all file) and one point per file for the other case. The coordinates are separated by a space character and are expected to be cartesian coordinates.

The chunks file is composed of several blocks separated by a newline, each block has the coordinates of each vertex of a continuous road segment (each vertex is the start point of a line and end point of another except for the first and last vertices of the block).

Calculating the index

You can create your own files following the last section rules to serve as inputs to the Python script that calculates the index. Configuration files are global, that means it's the same file for all parts of the project.

You can create your own function editing the src/ire.py file.

Plots

The last part of the run.sh script generates some images and a csv file with the index calculated for each point. You must have gnuplot in order for this to run.

Clone this wiki locally