-
Notifications
You must be signed in to change notification settings - Fork 10
/
sample_conf.py
60 lines (57 loc) · 1.92 KB
/
sample_conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# CONFIGURATION FILE
# set the parameters unique to your setup below
# then rename this file to "conf.py"
# for handling projections
from functools import partial
import pyproj
# this must be a meter-based projection appropriate for your region
# UTM projections are suggested.
PROJECT_EPSG = 26917
conf = {
# PostgreSQL database connnection
'db':
{
'host':'localhost',
'name':'', # database name
'user':'',
'password':'',
'tables':{
# these are SQL-safe table names used directly in queries
# if you set up the tables with etc/create-agency-tables.sql,
# you have likely changed the prefix
'trips':'prefix_trips',
'stops':'prefix_stops',
'stop_times':'prefix_stop_times',
'directions':'prefix_directions'
}
},
# agency tag for the Nextbus API, which can be found at
# http://webservices.nextbus.com/service/publicXMLFeed?command=agencyList
'agency':'ttc',
# Where is the ORSM server? Give the root url
'OSRMserver':{
'url':'http://localhost:5000',
'timeout':10 # seconds
},
'min_OSRM_match_quality':0.3,
# function for projecting from lat-lon for shapely
# http://toblerity.org/shapely/manual.html#other-transformations
# http://all-geo.org/volcan01010/2012/11/change-coordinates-with-pyproj/
'projection':partial(
pyproj.transform,
pyproj.Proj('+init=EPSG:4326'),
pyproj.Proj('+init=EPSG:'+str(PROJECT_EPSG))
),
'localEPSG':PROJECT_EPSG,
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# This must be an unabreviated timezone name to allow postgresql to account
# for daylight savings time.
'timezone': 'America/Toronto',
# distance threshold for stop matching in meters; stops more than this far
# away from the matched route will not be included
'stop_dist':30,
# estimated GPS error radius in meters
# this applies to all points and effects map-matching
# higher values include more potential matches but take longer to process
'error_radius':20
}