#!/usr/bin/env python
# -*- coding: utf-8 -*-

from os import path, getcwd
from collections import defaultdict
config = defaultdict(defaultdict)

config["importer"] = "osm2pgsql" # either 'imposm' or 'osm2pgsql'

# 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"] = "OSM Bright"

# 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(".")

# PostGIS connection setup
# Leave empty for Mapnik defaults. The only required parameter is dbname.
config["postgis"]["host"]     = "gis-db"
config["postgis"]["port"]     = ""
config["postgis"]["dbname"]   = "gis"
config["postgis"]["user"]     = "maposmatic"
config["postgis"]["password"] = "secret"

# 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["postgis"]["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"] = path.join(getcwd(),"shp/land-polygons-split-3857/land_polygons.shp")
config["land-low"] = path.join(getcwd(),"shp/simplified-land-polygons-complete-3857/simplified_land_polygons.shp")

# Places shapefile required for the osm2pgsql style
# - http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.4.0/cultural/10m-populated-places-simple.zip
#  or
# - http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip

config["ne_places"] = path.join(getcwd(),"shp/10m-populated-places-simple/10m-populated-places-simple.shp")

@@ -1768,39 +1768,44 @@
 igh%22%5D = 
-path.join(getcwd(),%22shp
+%22/home/maposmatic/shapefiles
 /land-po
@@ -1840,17 +1840,16 @@
 ons.shp%22
-)
 %0Aconfig%5B
@@ -1862,39 +1862,44 @@
 low%22%5D = 
-path.join(getcwd(),%22shp
+%22/home/maposmatic/shapefiles
 /simplif
@@ -1959,17 +1959,16 @@
 ons.shp%22
-)
 %0A%0A# Plac
@@ -2267,36 +2267,44 @@
 %5D = 
-path.join(getcwd(),%22shp/10m-
+%22/home/maposmatic/shapefiles/ne_10m_
 popu
@@ -2312,27 +2312,30 @@
 ated
--
+_
 places
--
+_
 simple/
+ne_
 10m
--
+_
 popu
@@ -2335,32 +2335,32 @@
 0m_populated
--
+_
 places
--
+_
 simple.shp%22)
@@ -2358,10 +2358,9 @@
 ple.shp%22
-)
 %0A

use absolute paths to shared global shape files instead of private copies