author(s): Justin stewart, Brett Sumser, Jake Petersen
Geocoder is an attempt to produce turn by turn directions from a gpx file/route by using the Texas A&M Geoservices web API.. To accomplish the intended results we used a reverse geocoder that takes in the Longitude and Latitude coordinates and returns addresses. We then use the addresses to return to the user a set of turn by turn directions as well as the distance between each turn. Multithreading has been implemented into the API requests to greatly reduce the time required to produce a queue sheet.
To find out information about the functionality of the code you can look inside the "algorithm.py" file in the flaskr directory. Each of the functions have been documented using python docstrings if the user wishes to print the docstrings for main.py they can do so by the below command
python3 flaskr/algorithm.py --docs
Geocoder relies upon the requests, numpy, and gpxpy module, you can use "pip3" to install these via the command below. The user will need there own valid Texas A&M geocoding API key as well to utilize their service for program functionality.
Clone the repo
git clone https://github.com/jpeter17/geocoder.git
Create a Virtual Environment in the project folder
mkdir <venv_name>
python3 -m venv <venv_name>
Activate the Virtual Environment
. <venv_name>/bin/activate
Use the package manager pip to install the requirements to run this project.
pip install -e .
Setup Environment Variables and run the project
export FLASK_APP=flaskr
export FLASK_ENV=development
flask init-db
flask run
Your project will be available at http://127.0.0.1:5000/
Create a User by clicking Register
Your Texas A&M API Key will be entered in here
Log-in and Create a new trip by clicking New
Acceptable file formats include .gpx
Below is pseudocode for the turn-by-turn algorithm that geocode utilizes to determine at which points in the route turns occur. To accomplish this we used a modified version of binary search to return a list of key points that turns are made.