Skip to content

Instantly share code, notes, and snippets.

View subblue's full-sized avatar

Tom Beddard subblue

View GitHub Profile
@subblue
subblue / get_terrain.rb
Last active August 7, 2023 00:45
A script to automate the download and generation of terrain tiles and contour shapes using GDAL for use in TileMill maps. Note - the contour generation doesn't currently work for merged tiles - trying to fix that!
#!/usr/bin/env ruby
require 'fileutils'
# Based on instructions from:
# http://steveko.wordpress.com/2013/09/11/terrain-in-tilemill-a-walkthrough-for-non-gis-types/
#
# Further reading:
# https://www.mapbox.com/tilemill/docs/guides/terrain-data/
# https://www.mapbox.com/blog/tilemill-raster-colorizer/
# https://www.mapbox.com/tilemill/docs/guides/optimizing-shapefiles/
@subblue
subblue / config.log
Created November 29, 2013 08:10
Mapnik brew build error config.log
» more /Users/tom/Library/Logs/Homebrew/mapnik/config.log
file /private/tmp/mapnik-e1l3/mapnik-v2.2.0/SConstruct,line 1032:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for freetype-config...
freetype-config --libs --cflags
-I/usr/local/Cellar/freetype/2.5.1/include/freetype2
-L/usr/local/Cellar/freetype/2.5.1/lib -lfreetype -lz -lbz2 -lpng15
scons: Configure: yes
scons: Configure: Checking for xml2-config...
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
# Command Enhancements
# Utility
alias reload='source ~/bin/dotfiles/bash/aliases'
alias ea='mate -w ~/bin/dotfiles/bash/aliases && reload' # Edit aliases
alias ee="mate ~/bin/dotfiles/bash/env"
alias eb="mate ~/bin"
# Quicker cd
alias cg='cd /Library/Ruby/Gems/1.8/gems/'