Skip to content

How to use TaxiMap

Xiaoxing Ye edited this page May 1, 2017 · 2 revisions

TaxiMap is a handy (never) tool to map records to the Google or Baidu Maps.

Before you run this tool, you need to prepare a text file that contains all records you will use. I recommend you to load one day only to prevent boom.

Steps:

  1. Install requirements using pip install -r requirements.txt.
  2. Run import.py then you will get a sqlite file with all records in it. Please be noted that some conversions have done.
    1. GEO points converted to GCJ (中国坐标)
    2. Some restrictions on record, like date after 2014.01.01, direction over 360 degrees, speed too large (>1000)
  3. Place the `taxi.db' with the TaxiMap app (usually they are together).
  4. Run python manage.py runserver
  5. Open http://localhost:5000/taxi/<int:taxi_id>/<string:_from> in your browser. Here
    1. Taxi ID is the unique id of each taxi.
    2. from is which map provider you use. baidu or google
    3. You may add more options. limit and offset in GET para.
    4. For Baidu, there are two more options from_type and to_type. Usually you should not modify them.
Clone this wiki locally