Skip to content

Instantly share code, notes, and snippets.

mojodna / SDTonerMapSource.h
Created Feb 21, 2014
Toner map provider for the Mapbox SDK.
View SDTonerMapSource.h
// SDTonerMapSource.h
// Toner Maps
#import <MapBox.h>
#import <UIKit/UIKit.h>
@interface SDTonerMapSource : RMAbstractWebMapSource
mojodna /
Created Apr 12, 2014
osm2pgsql style for hstore data
way way_area real
way z_order integer
# These tags can be long but are useless for rendering.
# This indicates that we shouldn't store them.
# List from <>
# OsmType Tag DataType Flags
node,way 3dshapes:* text delete
node,way AND_nosr_r text delete
node,way b5m:* text delete
mojodna / tilelive-minimal.js
Created Jul 30, 2014
A minimal tilelive source.
View tilelive-minimal.js
"use strict";
* Note:
* setImmediate(callback, null, {});
* is shorthand for:
* setImmediate(function() {
View label-scaling.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[]>
<Map 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" buffer-size="128">
<Parameter name="bounds">-120.0146,27.6057,-104.6118,36.0313</Parameter>
<Parameter name="center">-113.4888,32.38,6</Parameter>
mojodna / Dockerfile
Created Nov 30, 2014
Minimalist awscli image w/ aws-cfn-bootstrap installed. Available from
View Dockerfile
FROM debian
ENV DEBIAN_FRONTEND noninteractive
apt-get update && \
apt-get install --no-install-recommends -y python-pip groff-base && \
apt-get clean && \
pip install awscli
mojodna / generate_hillshades.js
Created Dec 4, 2014
Parallelize hillshade generation using PostGIS. Much worse than generating hillshades from GeoTIFF inputs.
View generate_hillshades.js
#!/usr/bin/env node
"use strict";
var os = require("os");
var async = require("async"),
env = require("require-env"),
pg = require("pg"),
ProgressBar = require("progress");
mojodna / print.js
Created Feb 23, 2015
Calculate zoom / bounds for target image size
View print.js
"use strict";
var assert = require("assert");
var merc = new (require("sphericalmercator"))();
var BASE_PPI = 72, // native ppi
BASE_ZOOM = 22; // sufficiently large zoom level to use pixels at
var getView = function(options) {
mojodna / queue_srtm.js
Created Apr 25, 2015
Vapor clock feeder
View queue_srtm.js
#!/usr/bin/env node
/* eslint-disable no-sync */
"use strict";
var assert = require("assert"),
fs = require("fs"),
path = require("path"),
util = require("util");
var env = require("require-env"),
View osm.xml
<Service name="TMS">
You can’t perform that action at this time.