This is the repository for my Msc Computing Dissertation.
For the code at submission see the branch submission-code
There are two parts to this project.
- Data processing to produce a set of alert points
- Mobile application to give audible alerts while driving
OpenStreetMap has been used in this project as the map data source. OpenStreetMap® is open data, licensed under the Open Data Commons Open Database License (ODbL) by the OpenStreetMap Foundation (OSMF). Further information available at openstreetmap.org/copyright
OSMnx is a Python library for working with OpenStreetMap data. It is licensed under the MIT license
geopy is a Python client for several popular geocoding web services. It is licensed under the MIT license
progressbar2 is a Python library to show a progress bar for a typically long running operation. It is licensed under BSD license
SimpleLatLng is a Java library for latitude and longitude calculations. This is licensed using the Apache 2.0 License
There are two scripts required for to run the data processing. Before running any scripts the following is required
- The
.osm
or.osm.pbf
file will need to be put inside thedata-processing/osm-raw
directory. - Both Osmconvert and Osmfilter need to be downloaded and placed in the
data-processing
directory with the file namesosmconvert64.exe
andosmfilter.exe
respectively.
Once the above is completed the two scripts are called for the data processing.
- First the raw data needs initial filtering by running
.\filter-raw-osm-data.ps1 .\osm-raw\NAME_OF_OSM_FILE.osm.pbf
. Once completed this will create aNAME_OF_OSM_FILE.osm
file in theosm-filtered
directory. - Second run the python script with the following command
python .\process_data.py .\osm-filtered\NAME_OF_OSM_FILE.osm
When completed the alerts will be saved to a JSON fileNAME_OF_OSM_FILE.json
in thealerts
directory.
The alert JSON file is copied into the app/app/src/main/res/raw
directory. Then in AlertCheckerService.java
within app/app/src/main/java/com/example/gpssafetydrivingapp/alerts
within the loadAlertPoints()
method the line getApplicationContext().getResources().openRawResource(R.raw.NAME_OF_JSON)
will need NAME_OF_JSON to be replaced with JSON filename without the extension.
The Android application can then be built.