Dependencies for preprocessing#

We use third-party tools to finish some complicated works in raw data processing, such as map-matching, generating shapefile, etc., which have been well done by others.

Step 1: Install the module#

First, we need to clone and install the module:

$ cd mtldp
$ git clone git@github.com:michigan-traffic-lab/mtldp-preproc.git
$ conda activate mtldp
(mtldp) $ pip install .

Step 2: Install fmm#

Warning

If you are using windows, please refer to this guide Installation of fmm in Windows.

We also need to install the dependencies to build fmm.

(mtldp) $ sudo apt install cmake build-essential libboost-dev gdal-bin swig \
 libboost-serialization-dev libgdal-dev libbz2-dev libexpat1-dev libosmium2-dev

Then we need to clone the source code of fmm and build it from the source code. This may cost more than 10 minutes, which depends on the performance of the computer.

(mtldp) $ git clone https://github.com/cyang-kth/fmm.git
(mtldp) $ cd fmm
(mtldp) $ mkdir build
(mtldp) $ cd build
(mtldp) $ cmake ..
(mtldp) $ make -j8
(mtldp) $ sudo make install

You can test the compilation by:

(mtldp) $ fmm --help
(mtldp) $ python
Python 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:10)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fmm
>>>

Step 3: Install osmnx#

Just use conda to install this. One thing that needs to be attention is that you must osmnx after you install fmm. Otherwise, there may be some complex dependency issues.

And, due to the low performance of Anaconda, this may cost more than 30 minutes.

conda config --prepend channels conda-forge
conda install --strict-channel-priority osmnx