forked from BorisPlus/mongodb_geo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase_config.py
More file actions
38 lines (38 loc) · 945 Bytes
/
base_config.py
File metadata and controls
38 lines (38 loc) · 945 Bytes
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
# MONGODB
MONGODB_CONNECTION_STRING = "mongodb://127.0.0.1:27001/"
MONGODB_DB_NAME = "geo"
# GEO OBJECTS VIEWS
DYNAMIC = 'dynamic'
STATIC = 'static'
# GEO OBJECTS TYPES
POINT_OBJECT = "point"
LINE_STRING_OBJECT = "line_string"
POLYGON_OBJECT = "polygon"
DEFAULT_OBJECT_TYPE = POINT_OBJECT
# BUSINESS LOGIC
MONGODB_DB_COLLECTIONS = dict(
static={
"geo_wikimapia_polygons": {
"area": POLYGON_OBJECT,
},
"meteorites": {
"location": POINT_OBJECT,
},
},
dynamic={
"geo_yandex_taxi": {
"last_point": POINT_OBJECT,
"path": LINE_STRING_OBJECT,
},
# "geo_city_mobil": {
# "location": POINT_OBJECT,
# },
},
)
CONTAINS_DYNAMIC_DATA = True if len(MONGODB_DB_COLLECTIONS.get(DYNAMIC, '')) else False
# Сыктывкар Аэропорт
# LAT = 61.663917
# LON = 50.850578
# Район СПб
LAT = 59.97
LON = 30.33