Skip to content

Instantly share code, notes, and snippets.

@skorasaurus
Created February 10, 2012 16:22
Show Gist options
  • Save skorasaurus/1790594 to your computer and use it in GitHub Desktop.
Save skorasaurus/1790594 to your computer and use it in GitHub Desktop.
osm-bright configuration
#!/usr/bin/env python
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 path to your MapBox projects directory. In Windows, this defaults to
# %UserProfile%\MapBox\project ; in Mac & Ubuntu it's ~/Documents/MapBox/project
config["path"] = "/home/skorasaurus/Documents/MapBox/project/"
# PostGIS connection setup
# Leave empty for Mapnik defaults. The only required parameter is dbname.
config["postgis"]["host"] = "localhost"
config["postgis"]["port"] = ""
config["postgis"]["dbname"] = "the-cleve"
config["postgis"]["user"] = "skorasaurus"
config["postgis"]["password"] = "IMNOTTELLING"
# 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"] = "-9114839.90615323 5070082.39993749 -9076134.11920441 5102141.6578814"
#-81.88,41.3903,-81.5323,41.606 lat/lon
# Land shapefiles required for the style. If you have already downloaded
# these or wish to use different versions, specify their paths here.
# OSM land shapefiles from MapBox are indexed for Mapnik and have blatant
# errors corrected (eg triangles along the 180 E/W line), but are updated
# infrequently. The latest versions can be downloaded from osm.org:
# - http://tile.openstreetmap.org/processed_p.tar.bz2
# - http://tile.openstreetmap.org/shoreline_300.tar.bz2
# config["processed_p"] = "http://tilemill-data.s3.amazonaws.com/osm/coastline-good.zip"
# config["shoreline_300"] = "http://tilemill-data.s3.amazonaws.com/osm/shoreline_300.zip"
config["processed_p"] = "/home/skorasaurus/Documents/MapBox/project/open-streets/layers"
config["shoreline_300"] = "/home/skorasaurus/Documents/MapBox/project/open-streets/layers"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment