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