Skip to content

Commit

Permalink
Have 'make.py pull' pull changes into the osm-bright directory correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ Ashton committed Feb 6, 2012
1 parent 20a244c commit cf4d98e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ def pull():
defaultconfig["postgis"]["user"] = ""
defaultconfig["postgis"]["password"] = ""
defaultconfig["postgis"]["extent"] = "-20037508.34 -20037508.34 20037508.34 20037508.34"
defaultconfig["name"] = "NYC Bright Osm2pgsql"
defaultconfig["name"] = "OSM Bright"
defaultconfig["processed_p"] = "http://tilemill-data.s3.amazonaws.com/osm/coastline-good.zip"
defaultconfig["shoreline_300"] = "http://tilemill-data.s3.amazonaws.com/osm/shoreline_300.zip"

project["name"] = defaultconfig["name"]
for layer in project["Layer"]:
if layer["id"] == "shoreline_300":
layer["Datasource"]["file"] = defaultconfig["shoreline_300"]
Expand All @@ -91,12 +92,12 @@ def pull():
else:
# Assume all other layers are PostGIS layers
for opt, val in defaultconfig["postgis"].iteritems():
if not val and opt in layer["Datasource"]:
del layer["Datasource"][opt]
else:
if val and opt in layer["Datasource"]:
layer["Datasource"][opt] = val
elif opt in layer["Datasource"]:
del layer["Datasource"][opt]

project_template = open(join("build", "osm-bright.%s.mml") % config["importer"], 'w')
project_template = open(join("osm-bright", "osm-bright.%s.mml") % config["importer"], 'w')
project_template.write(dumps(project, sort_keys=True, indent=2))

#now delete project.mml
Expand Down

0 comments on commit cf4d98e

Please sign in to comment.