See script below.
Make sure the Python file is executable. Then:
$ ./mpl2qgis.py viridis bone
This writes a file colourmaps.xml
. Result:
This guide assumes that you recently run brew upgrade postgresql
and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.
First let's check something.
brew info postgresql
The top of what gets printed as a result is the most important:
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
var degrees2meters = function(lon,lat) { | |
var x = lon * 20037508.34 / 180; | |
var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180); | |
y = y * 20037508.34 / 180; | |
return [x, y] | |
} | |
//test | |
lon= -77.035974 | |
lat = 38.898717 |
# Written by Aaron Cohen -- 1/14/2013 | |
# Brought to you by BitTorrent, Inc. | |
# "We're not just two guys in a basement in Sweden." TM | |
# | |
# This work is licensed under a Creative Commons Attribution 3.0 Unported License. | |
# See: http://creativecommons.org/licenses/by/3.0/ | |
import sys | |
import re | |
import socket |