Skip to content

Commit

Permalink
updated docs, configure.py.sample, and make.py regarding updated coas…
Browse files Browse the repository at this point in the history
…tline files
  • Loading branch information
skorasaurus committed Dec 4, 2013
1 parent 8a520b9 commit 1adca33
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ implementation.

[Carto]: http://github.com/mapbox/carto/
[TileMill]: http://tilemill.com/
[issue tracker]: http://github.com/developmentseed/osm-bright/issues/
[issue tracker]: http://github.com/mapbox/osm-bright/issues/

Setup Instructions
------------------
Expand Down
22 changes: 10 additions & 12 deletions configure.py.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

#!/usr/bin/env python

from os import path, getcwd
Expand Down Expand Up @@ -32,15 +35,10 @@ 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.
# OSM land shapefiles from MapBox are indexed for Mapnik and have blatant
# errors corrected (eg triangles along the 180 E/W line). They can be download
# from:
# - http://tilemill-data.s3.amazonaws.com/osm/coastline-good.zip
# - http://tilemill-data.s3.amazonaws.com/osm/shoreline_300.zip
# But, they 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"] = path.join(getcwd(),"coastline-good.zip")
config["shoreline_300"] = path.join(getcwd(),"shoreline_300.zip")
# http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.3.0/physical/10m-land.zip
config["land"] = path.join(getcwd(),"10m-land.zip")
# These OSM land shapefiles are updated daily and can be downloaded from:
# - 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(),"land-polygons-split-3857.zip")
config["land-low"] = path.join(getcwd(),"simplified-land-polygons-complete-3857.zip")

26 changes: 13 additions & 13 deletions make.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

#!/usr/bin/env python

import re
Expand Down Expand Up @@ -41,12 +44,10 @@ def build():

#fill in the project template
for layer in template["Layer"]:
if layer["id"] == "shoreline_300":
layer["Datasource"]["file"] = config["shoreline_300"]
elif layer["id"] in ("processed_p", "processed_p_outline"):
layer["Datasource"]["file"] = config["processed_p"]
elif layer["id"] in ("land"):
layer["Datasource"]["file"] = config["land"]
if layer["id"] == "land-low":
layer["Datasource"]["file"] = config["land-low"]
elif layer["id"] == "land-high":
layer["Datasource"]["file"] = config["land-high"]
else:
# Assume all other layers are PostGIS layers
for opt, val in config["postgis"].iteritems():
Expand Down Expand Up @@ -87,16 +88,15 @@ def pull():
defaultconfig["postgis"]["password"] = ""
defaultconfig["postgis"]["extent"] = "-20037508.34 -20037508.34 20037508.34 20037508.34"
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"
defaultconfig["land"] = "http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.3.0/physical/10m-land.zip"
defaultconfig["land-high"] = "http://data.openstreetmapdata.com/land-polygons-split-3857.zip"
defaultconfig["land-low"] = "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip"

project["name"] = defaultconfig["name"]
for layer in project["Layer"]:
if layer["id"] == "shoreline_300":
layer["Datasource"]["file"] = defaultconfig["shoreline_300"]
elif layer["id"] in ("processed_p", "processed_p_outline"):
layer["Datasource"]["file"] = defaultconfig["processed_p"]
if layer["id"] == "land-low":
layer["Datasource"]["file"] = defaultconfig["land-low"]
elif layer["id"] == "land-high":
layer["Datasource"]["file"] = defaultconfig["land-high"]
else:
# Assume all other layers are PostGIS layers
for opt, val in defaultconfig["postgis"].iteritems():
Expand Down
3 changes: 2 additions & 1 deletion osm-bright/osm-bright.osm2pgsql.mml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"id": "land-high",
"name": "land-high",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"srs-name": "900913"
"srs-name": "900913",
"status": "on"
},
{
"Datasource": {
Expand Down

0 comments on commit 1adca33

Please sign in to comment.