Skip to content

Installation of fmm (cpp)

Can Yang edited this page Sep 20, 2019 · 16 revisions

Requirements

  • C++ Compiler supporting c++11 and OpenMP
  • CMake >=3.5: cross platform building tools
  • GDAL >= 2.2: IO with ESRI shapefile, Geometry data type
  • Boost Graph >= 1.54.0: routing algorithms used in UBODT Generator
  • Boost Geometry >= 1.54.0: Rtree, Geometry computation
  • Boost Serialization >= 1.54.0: Serialization of UBODT in binary format

Ubuntu platform (tested with 16.04)

Install requirements with

sudo apt-get install libboost-dev libboost-serialization-dev gdal-bin libgdal-dev make cmake

Install the program with

  # Under the project folder
  mkdir build
  cd build
  cmake ..
  make
  sudo make install

It will build executable files under the build folder, which are installed to /usr/local/bin:

  • ubodt_gen: the Upper bounded origin destination table (UBODT) generator (precomputation) program
  • ubodt_gen_omp: the parallel Upper bounded origin destination table (UBODT) generator (precomputation) program.
  • fmm: the map matching program (single processor)
  • fmm_omp: parallel map matching implemented with OpenMP.

These executable files will be copied into the ~/bin path, which should be added to the PATH variable by default.

Verfication of installation

Open a new terminal and type fmm, you should see the following output:

------------ Fast map matching (FMM) ------------
------------     Author: Can Yang    ------------
------------   Version: 2017.11.11   ------------
------------     Applicaton: fmm     ------------
No configuration file supplied
A configuration file is given in the example folder
Run `fmm config.xml`

To run the program, check run map matching in C++.

Windows platform

Tested on Win7 (64bit) with cygwin environment

  1. Install cygwin and apt-cyg

After you have installed cygwin, open the cygwin-terminal and run the following scripts to install apt-cyg.

  wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg
  chmod +x apt-cyg
  mv apt-cyg /usr/local/bin
  1. Install libraries using apt-cyg
  apt-cyg install make gcc-g++ cmake gdal libboost-devel libgdal-devel
  1. Build the program
  # Under the fmm project folder
  mkdir build
  cd build
  cmake -G "Unix Makefiles" ..
  make
  make install
  1. Verification of installation

In the cyg-win terminal, type

  fmm

You should see

------------ Fast map matching (FMM) ------------
------------     Author: Can Yang    ------------
------------   Version: 2018.03.09   ------------
------------     Applicaton: fmm     ------------
No configuration file supplied
A configuration file is given in the example folder
Run `fmm config.xml`
------------    Program finished     ------------

💡 You can check the folder on your windows explorer at c:\cygwin\home( corresponding to /home directory in cygwin.)

Mac platform

Install requirements with

  brew install boost gdal libomp

Install the program with

  # Under the project folder
  mkdir build
  cd build
  cmake ..
  make
  sudo make install