• Stars
    star
    144
  • Rank 255,590 (Top 6 %)
  • Language CartoCSS
  • License
    ISC License
  • Created over 9 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

World-wide CartoCSS port of Stamen's classic terrain style

Terrain Classic

World-wide CartoCSS port of Stamen's classic terrain style.

Stamen's original Terrain style was developed in 2011 as part of Stamen's Citytracking initiative, funded by the Knight Foundation. The old repository can be found here, for historical interest.

The original Terrain style only covered the United States. As part of a new Knight Foundation grant, we expanded Terrain to cover the entire world. The Knight grant also funded prototyping for some totally-different new terrain styles, so to avoid confusion we are calling the this reboot of the old style "Terrain Classic."

Terrain screenshot

Most of the current development process for Terrain Classic is based on the toner-carto repo.

Developing

Prerequisites

  • PostgreSQL
  • PostGIS @2.2.0
  • Node.js --version 0.10*
  • GDAL
  • TileMill 1@master (this includes the latest Mapnik): github.com/mapbox/tilemill
  • Imposm 3, which includes dependencies of its own: go, leveldb, and protobuf.

*NOTE: The Node Version Manager script is helpful if you are using a more recent version of Node than 0.10 (which is fairly likely). This is important as TileMill 1@master will only run on Node --version 0.10.

On OS X, installation with Homebrew looks like this:

brew install postgis gdal node go leveldb protobuf pv

# follow instructions to start postgresql

mkdir -p /tmp/imposm
cd /tmp/imposm
export GOPATH=`pwd`
git clone https://github.com/omniscale/imposm3 src/imposm3
go get imposm3
go install imposm3

# bin/imposm3 is your new binary; either add $GOPATH/bin to your PATH or copy
# it to /usr/local/bin (or similar)

Terrain Classic Itself

  • Clone this repo
  • Run make link to sym-link the project into your TileMill project directory
  • Run make db/shared to fetch and transform Natural Earth and OSM coastline data
  • Run make db/CA (or similar; seePLACES in the Makefile for a list of registered extracts and expand it as desired).
  • Run make to generate the project.mml file. (Alternatively, maketerrain-classic-background, terrain-classic-lines, orterrain-classic-labels to work on the variant styles)
  • Start TileMill by running npm start from the TileMill repo
  • Open http://localhost:20009/#/project/terrain-classic

make db/<place> will write to the database specified in .env (with a format that resembles postgres:///terrain, where terrain is the database name). If you experience trouble connecting, try adding credentials, e.g. postgres://user:password@localhost/terrain (it will use $USER with no password otherwise). Barring that, check yourpg_hba.conf to ensure that access is configured correctly.

(We primarily develop on OS X where PostgreSQL from Homebrew works out of the box.)

NOTE: Changes to project settings (i.e. .mml files not .mss stylesheets) in TileMill will not persist the changes. To make changes, edit the relevant .yml file and re-run make [variant] to re-generate the project.mml that TileMill reads.

To test the terrain style with a hillshade overlay, a tessera.json config is provided. Install tessera with npm install tessera and then run npm start in the terrain-classic directory. Open http://localhost:8080/ to view the terrain-classic style composited with Open Terrain hillshades.

Testing with the side-by-side viewer (experimental)

In the root folder run npm install && npm start which will start tessera running at http://localhost:8080

Then, in the side-by-side folder, run a simple webserver such as python -m SimpleHTTPServer. Then go to http://localhost:8000 (or whatever port the webserver is running at) to view the side-by-side viewer.

FAQ

What's the deal with the Makefile? Why is it so complicated?

Magic, mostly. It probably can (and should) be simplified! Consider this another, in-progress "make for data" approach (which actually uses make).

The goal here is to provide an idempotent process for bootstrapping the project that uses as few additional dependencies as possible. make is the age-old solution to this problem, although it takes a more file-focused approach. Put another way, it attempts to efficiently encapsulate otherwise complicated and error-prone operations.

The Makefile here attempts to replicate make's behavior relative to rebuilding files with database tables. In other words, if a Postgres relation already exists, it will be left as-is. If it doesn't exist (has been dropped or hasn't been created), it will be created on-demand.

Why do I have to install pgexplode?

libpq (which underlies PostgreSQL's command-line tools) supports a number of environment variables which can be used to avoid repetition (and avoid errors). However, each component of the connection information is separate, and is more easily and concisely encoded in a URI (i.e. DATABASE_URL). pgexplode is aware of libpq's environment variables and will expand DATABASE_URLs components (which is simpler than managing multiple values and constructing a URL for imposm3 and other tools).

More Repositories

1

modestmaps-js

Modest Maps javascript port
JavaScript
565
star
2

toner-carto

CartoCSS port of Toner
CartoCSS
329
star
3

maps.stamen.com

Stamen Maps
HTML
229
star
4

modestmaps-py

Modest Maps python port
Python
83
star
5

spatial-dataviz-for-data-scientists

Spatial Data Visualization for Data Scientists
CartoCSS
48
star
6

maperture

Svelte
39
star
7

modestmaps-php

Modest Maps php port
PHP
35
star
8

the-ultimate-tile-stitcher

stitch & scrape tiles from slippy map services
Python
34
star
9

watercolor

Python
33
star
10

mapbox-gl-toner

Highly experimental implementation of the Toner style for Mapbox GL vector rendering
29
star
11

geojson2pgsql

JavaScript
27
star
12

Productive-Birds

Project management thingie
PHP
27
star
13

scale-a-tron

aka Scaletor, take screenshots of a piece of a map and scale/compare with other parts of the map
JavaScript
26
star
14

open-redistricting

A collaborative, open legislative redistricting tool, built atop GitHub.
JavaScript
25
star
15

geo-albers-usa-territories

A map projection including all US overseas possessions
JavaScript
21
star
16

slackbot-tell

Slackbot reminders for other people
JavaScript
19
star
17

chartographer

JavaScript
19
star
18

dwsd

designing with spatial data - workshop materials
18
star
19

ecoengine

Interactive visual exploration tools for https://ecoengine.berkeley.edu/
HTML
16
star
20

elevate

Enrich GeoJSON features using the MapQuest Open Elevation API.
JavaScript
15
star
21

mapstitch

Stitches map tiles together
JavaScript
14
star
22

here-xyz-demo

Some demo code for making maps with HERE XYZ Spaces
HTML
12
star
23

prosthetic

A web proxy for augmenting web sites with new capabilities
JavaScript
12
star
24

sf_smoke

Notes for creating an animated gif of California wildfires
9
star
25

openterrain-map

Makefile
7
star
26

side-by-side

side-by-side Leaflet viewer
HTML
7
star
27

merge-geojson-features

Merges GeoJSON Features and FeatureCollections
JavaScript
7
star
28

stamen-qgis

QGIS plugins
Python
5
star
29

maptcha-v2

Maptcha Version 2
Python
5
star
30

mapbox-gl-style-linter

Lint Mapbox GL styles
JavaScript
5
star
31

pgexplode

Explode PostgreSQL DATABASE_URLs into environment variables
JavaScript
5
star
32

mapbox-gl-style-build

Build Mapbox GL styles by composing layers
JavaScript
5
star
33

mapbox-gl-style-format

Format Mapbox GL styles in a consistent manner
JavaScript
4
star
34

vignette

Generate sample images for regions/zooms
JavaScript
4
star
35

bluegreenway

Maps and events along SF's Blue Greenway
JavaScript
4
star
36

vapor-clock

SQS-powered file conversions
JavaScript
4
star
37

postgis-to-raster

Generate PNGs from PostGIS
JavaScript
4
star
38

tilestache-goodies

Python
4
star
39

aries-magic-list

A magical hand-curated list of city labels
Python
3
star
40

splatter

Splatter!
JavaScript
3
star
41

sm2

tessera-powered sandwich maker
JavaScript
3
star
42

s3-tile-purger

Purges map tiles from S3 buckets
JavaScript
3
star
43

mapbox-gl-style-remove-defaults

Remove properties with default values from Mapbox GL styles
JavaScript
3
star
44

media-harvesters

SQLPL
3
star
45

pinterest.tm2

Repo for new Pinterest base map
3
star
46

Cabspotting

Spots cabs.
JavaScript
3
star
47

phi-color

Generate random colors with a given sphere in the HCL color space using the Golden Ratio
JavaScript
3
star
48

invertorator

Style inverter and hue rotator from / to dark mode maps
HTML
3
star
49

rio-vectortiles

Python
2
star
50

who-immunization-2018

WHO 2018 (done in 2019) Immunization coverage report
Roff
2
star
51

kevlar

Synthetic load generation
JavaScript
2
star
52

oncor-workshop-notes

Notes and links for dataviz workshop, 2018-10-03
2
star
53

node-tileserver

JavaScript
2
star
54

git-history-streamgraph

JavaScript
2
star
55

mapbox-gl-style-performance-linter

JavaScript
2
star
56

atom-cartodb

CartoDB support for Atom
JavaScript
2
star
57

holdtime

Measure time spent waiting for a callback
JavaScript
2
star
58

mapbox-gl-style-diff

JavaScript
2
star
59

panorama-template

Template / boilerplate for using stamen/panorama components, in a tasty React/Redux/React-Router shell
CSS
2
star
60

exquisite

SQS-powered offline tasks
JavaScript
2
star
61

pleth

Choropleths and beyond!
JavaScript
2
star
62

cartodb-yaml

Compile YAML CartoDB Named Map configs to JSON
JavaScript
1
star
63

slackbot-track

Slackbot time tracker
JavaScript
1
star
64

cartodb-client

An AMD friendly JS client for the cartodb API
JavaScript
1
star
65

react_webpack_starter

A basic react webpack boilerplate
JavaScript
1
star
66

philly-civiccommons

Quality of public services in Philadelphia based on Yelp
JavaScript
1
star
67

osm2pgsql-hstore-shim

PostgreSQL views to expose osm2pgsql hstore imports with legacy schemas
1
star
68

map-app

JavaScript
1
star
69

leaflet-zoom-extras

Extends Leaflet's Zoom controller to allow for extra buttons
JavaScript
1
star
70

ecoengine-compare

Berkeley Eco Engine compare demo
JavaScript
1
star
71

node-geocoder

A zoom-calculating BOSS Placefinder proxy.
JavaScript
1
star
72

legend-layer-menu

Acts as a legend and controls for a map
JavaScript
1
star
73

lint-mapbox-gl-style-action

A GitHub action that lints Mapbox GL styles
1
star
74

socs

Streamline the creation of a social sharing widget.
JavaScript
1
star
75

super-classy-js

A extendable base-class for javascript. _NOT A FRAMEWORK_
JavaScript
1
star
76

sando-parser

Declarative compositing for humans
JavaScript
1
star
77

swfr

Promise-based Node.js Simple Workflow (SWF) framework
JavaScript
1
star
78

afghanelection

Map sketches for the Afghanistan Elections
HTML
1
star
79

ecoengine-client

A Javascript client for the Eco Engine API
JavaScript
1
star
80

load-healthcheck

Uses system load as a proxy for health
JavaScript
1
star
81

figmasset-spritesheet-action-example

Example of using figmasset-spritesheet-action
1
star