• Stars
    star
    239
  • Rank 167,826 (Top 4 %)
  • Language CartoCSS
  • Created about 13 years ago
  • Updated almost 9 years ago

Reviews

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

Repository Details

The last OpenStreetMap road query you will ever need.

High Road

This may be the last OpenStreetMap road query you will ever need.

Between Mapnik, Cascadenik, and Carto, you’ve got a few options for rendering OSM data to tiles. High Road makes it easier to draw the road bits by hiding complicated PostGIS queries behind views, so that you can declutter your layer names while ensuring that you’re using the right selection of roads for each zoom level.

There’s a sample Cascadenik style and layer file, but the real action is in high_road_views-setup.pgsql, where you’ll find a comprehensive set of Postgres views against the usual planet_osm_line table produced by Osm2pgsql.

To use High Road, run the source of high_road_views-setup.pgsql against your existing OSM rendering database and check out the sample files to understand what each query is doing.

High Road is made by Michal Migurski, Nathaniel Kelso and Geraldine Sarmiento of Stamen Design.

Setup

High Road can be applied to an existing OpenStreetMap rendering database created with osm2pgsql (http://wiki.openstreetmap.org/wiki/Osm2pgsql). Using the command-line psql utility, you can add High Road views like this:

psql -U username -f high_road_views-setup.pgsql databasename

The views here assume that you've created your database using the default settings of osm2pgsql, including the prefix of "planet_osm". If you've chosen a different prefix, you should find every instance of "planet_osm" in the script below and replace is with your chosen prefix. The typical username for OSM databases is osm and the typical databasename is planet_osm.

More details in the high_road_views-setup.pgsql file comments.

Removal, upgrading

High Road can be removed from an existing OpenStreetMap rendering database.

NOTE: To upgrade your OSM planet, High Road will need to be removed before OSM import, then setup again after OSM import.

Using the command-line psql utility, you can remove High Road views like this:

 psql -U username -f high_road_views-remove.pgsql databasename

The views here assume that you've created your database using the default settings of osm2pgsql, including the prefix of "planet_osm". If you've chosen a different prefix, you should find every instance of "planet_osm" in the script below and replace is with your chosen prefix.

This is the same as if you logged into Postgres:

psql -U username -d databasename

And dropped the views manually:

DROP VIEW planet_osm_line_z15plus CASCADE;
DROP VIEW planet_osm_line_z14 CASCADE;
DROP VIEW planet_osm_line_z13 CASCADE;
DROP VIEW planet_osm_line_z12 CASCADE;
DROP VIEW planet_osm_line_z11 CASCADE;
DROP VIEW planet_osm_line_z10 CASCADE;

Details

Taking a cue from Justin O’Bierne’s dearly-departed 41Latitude blog, High Road ensures that each zoom level contains exactly three distinct levels of road: highways, major roads, and minor roads, a simplification of OpenStreetMap’s conventional six-level hierarchy.

At distant zoom levels, local and residential streets are omitted. Bold, simple highways dominate the map, and the visual layering is categorical to clearly separate each road type.

Oakland, z11

Deeper in to the map, local streets and highway ramps start to appear. You begin to see block-scale details:

Oakland, z13

At the closest zoom levels, physical layering takes over and you begin to see over- and underpasses as they exist in the built world:

Oakland, z15

Oakland, for real

Elsewhere

A maze of ramps marks the east approach to New York’s Lincoln Tunnel:

New York, z16

A cloverleaf interchange on Moscow’s MKAD:

Moscow, z14

London’s dense network of trunk roads, centered on the Isle of Dogs:

London, z12

More Repositories

1

Dymo

Map label placer with simulated annealing.
Python
143
star
2

Skeletron

Computes straight skeletons of simple polygons
Python
109
star
3

paperwalking

Like walking, but with paper
PHP
94
star
4

Extractotron

Placeholder for some ideas about OpenStreetMap extracts
HTML
84
star
5

Squares

…small, extensible, free and open-source library for in-browser maps, written in Typescript and using D3 under the hood.
JavaScript
70
star
6

OSM-Solar

Ultra-lightweight rendering style for OpenStreetMap
Python
66
star
7

Tile-Drawer

Quickly select and host OpenStreetMap-based map tiles in the cloud
JavaScript
59
star
8

Bloch

Rock out with your Bloch out.
Python
58
star
9

Blit

Python
57
star
10

DEM-Tools

Tools For DEMs
Python
56
star
11

census-tools

Scripts for dealing with U.S. Census data
Python
43
star
12

LilJSON

A small Python script that makes JSON smaller by removing space and reducing float precision.
Python
41
star
13

canvas-warp

Map warping with HTML canvas
JavaScript
38
star
14

modestmaps-as3

Modest Maps actionscript3 port
ActionScript
38
star
15

modestmaps-py

Modest Maps python port
Python
37
star
16

NokiaWebGL

Bits of code for pulling data out of Nokia's WebGL map tiles.
Python
33
star
17

This-Tract

One U.S. census tract at a time
JavaScript
18
star
18

Redistricting

Python
14
star
19

shlong

A web service for URLs short and long
PHP
12
star
20

modestmaps-js

Modest Maps javascript port
JavaScript
10
star
21

oauth-dance

The Dance of OAuth
Python
10
star
22

OSM.us-vector-datasource

The TileStache configuration that runs http://openstreetmap.us/~migurski/vector-datasource/
Python
9
star
23

atkinson

Atkinson dithering of PIL images in Python
8
star
24

OSMWorldData

Scripts for creating worldwide data derived from OSM.
Python
8
star
25

ColorCheat

Simple color transformations by way of a mapping file
Python
6
star
26

spatialreference

Git mirror of spatialreference.org. Also a test to see how Git deals with thousands of tiny files (spoiler: not well).
JavaScript
6
star
27

Ramseyfier

Figure out the parts of your shapefiles that make Paul Ramsey cry
Python
6
star
28

Changepipe

Makes feed for OpenStreetMap changesets based on the per-minute replication files.
Python
6
star
29

potlatch2

OpenStreetMap editor Potlatch2
5
star
30

GOSM

OpenStreetMap Genuine Advantage
Python
4
star
31

Viewfinderpanos-Index

HTTP index to Viewfinder Panoramas digital elevation models
PHP
3
star
32

whereami

The little python script that tells you where you are
Python
3
star
33

literally-any-democrat

Python
3
star
34

substream

Doofing around with the firehose
Python
3
star
35

Faumaxion

Python
3
star
36

modestmaps-php

Modest Maps php port
PHP
3
star
37

Blobdetector

Detector for blobs
C++
3
star
38

talkingpapers

Python
2
star
39

Kruddler

Post images from Tumblr to Mastadon
Python
2
star
40

PlanetIndex

Proposal for new planet.openstreetmap.org autoindex.
Python
2
star
41

GridTile

A little tiny TileCache and all it does is make grids
Python
2
star
42

chefbase

Base repo for using chef-solo. Merge me into your project! Tested on Ubuntu 14.04.
Shell
2
star
43

Numbers-Station

PHP
2
star
44

modestmaps-as2

Modest Maps actionscript2 port
ActionScript
2
star
45

census-remote-index

Remote indexes for census data from static URLs
Python
2
star
46

dwim

Do What I Meanâ„¢
Python
1
star
47

SMS2BART4ETA

SMS to BART for estimated train arrival times
PHP
1
star
48

drive.vote.map

1
star
49

GDALAMBDA

Python
1
star
50

RRDCore

That which can be measured will be gamed
1
star
51

circle-beacon

Tickles Circle CI to retry a build
Python
1
star
52

d34d

D3 For Dummies
1
star
53

OSMGridTile

Clickable maps are one of OpenStreetMap's Top Ten Tasks; this TileStache provider implements a UTFGrid-like JSON layer to support them.
Python
1
star
54

ArtisinalInts

Interface to hand-crafted integers from Brooklyn and San Francisco.
Python
1
star