-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.py
executable file
·56 lines (47 loc) · 2.55 KB
/
configure.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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from os import path, getcwd
from collections import defaultdict
import os
config = defaultdict(defaultdict)
config["importer"] = "spatialite"
# The name given to the style. This is the name it will have in the TileMill
# project list, and a sanitized version will be used as the directory name
# in which the project is stored
config["name"] = { "styles/osm-bright": "OSM Bright",
"styles/osm-bright-en": "OSM Bright English",
"styles/osm-bright-car": "OSM Bright Car",
"styles/osm-bright-car-en": "OSM Bright Car English",
"styles/mc": "Midnight Commander",
"styles/mc-en": "Midnight Commander English",
"styles/mc-car": "Midnight Commander Car",
"styles/mc-car-en": "Midnight Commander Car English",
}
# The absolute path to your MapBox projects directory. You should
# not need to change this unless you have configured TileMill specially
config["path"] = path.expanduser("./install")
if not os.path.exists(config["path"]):
os.makedirs(config["path"])
# SQLite connection setup
config["sqlite"]["metadata"] = "mapnik_metadata"
config["sqlite"]["file"] = "country/mapnik.sqlite"
config["sqlite"]["initdb"] = "PRAGMA cache_size = -20480;" # SELECT load_extension('mod_spatialite');"
config["sqlite"]["geometry_field"] = "geometry"
config["sqlite"]["wkb_format"] = "generic"
config["sqlite"]["wkb_format"] = "twkb"
config["sqlite"]["use_spatial_index"] = "true"
config["sqlite"]["type"] = "sqlite"
# Increase performance if you are only rendering a particular area by
# specifying a bounding box to restrict queries. Format is "XMIN,YMIN,XMAX,YMAX"
# in the same units as the database (probably spherical mercator meters). The
# whole world is "-20037508.34 -20037508.34 20037508.34 20037508.34".
# Leave blank to let Mapnik estimate.
#config["sqlite"]["extent"] = "-20037508.34,-20037508.34,20037508.34,20037508.34"
# Land shapefiles required for the style. If you have already downloaded
# these or wish to use different versions, specify their paths here.
# You will need to unzip these files before running make.py
# These OSM land shapefiles are updated daily and can be downloaded at:
# - http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip
# - http://data.openstreetmapdata.com/land-polygons-split-3857.zip
config["land-high"] = "global/land-polygons-split-3857/land_polygons.shp"
config["land-low"] = "global/simplified-land-polygons-complete-3857/simplified_land_polygons.shp"