-
Notifications
You must be signed in to change notification settings - Fork 2
/
make-config.py
42 lines (32 loc) · 1.03 KB
/
make-config.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
from sys import argv
from datetime import datetime
import time
import json
if (len(argv) < 3):
print "ingrese el nuemor del archivo el menor y despues el mayor"
exit()
config_json=[]
for x in range(int(argv[1]), int(argv[2])+1):
project={
"source": "sf",
"destination": "sf"+ str(x),
"format": "png",
"minzoom": 1,
"maxzoom": 16,
"width":1068,
"height":1093,
"mml": {
"Layer": [
{
"Datasource": {
"file": "/home/ruben/Apps/visualization/data/sf"+str(x)+".geojson"
}
}
],
"advanced": {},
"name": "nd"+ str(x)
}
}
config_json.append(project)
print 'saving geojson'
json.dump(config_json, open('config.json', 'w'))