This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var stream = require("stream"), | |
util = require("util"); | |
var buffertools = require("buffertools"); | |
var BinarySplitter = function(delimiter) { | |
stream.Transform.call(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write com.spacemonkey.SpaceMonkey SMEnableTimeMachine 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gdal-1.10.1 and proj-4.8.0 were built according to the directions here: https://github.com/mojodna/heroku-buildpack-gdal | |
Due to differences in the available base packages, different features are available (e.g. no PostgreSQL). | |
```bash | |
mlogin -s /stamen/public/gdal-1.10.1-1.sh --init="/assets/stamen/public/gdal-1.10.1-1.sh" | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
include "dynamic_backends.vcl"; | |
# ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION zoom(scaleDenominator numeric) RETURNS int AS $$ | |
BEGIN | |
CASE | |
WHEN scaleDenominator > 1000000000 THEN RETURN 0; | |
WHEN scaleDenominator <= 1000000000 AND scaleDenominator > 500000000 THEN RETURN 1; | |
WHEN scaleDenominator <= 500000000 AND scaleDenominator > 200000000 THEN RETURN 2; | |
WHEN scaleDenominator <= 200000000 AND scaleDenominator > 100000000 THEN RETURN 3; | |
WHEN scaleDenominator <= 100000000 AND scaleDenominator > 50000000 THEN RETURN 3; | |
WHEN scaleDenominator <= 50000000 AND scaleDenominator > 25000000 THEN RETURN 4; | |
WHEN scaleDenominator <= 25000000 AND scaleDenominator > 12500000 THEN RETURN 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT ST_AsText( | |
ST_PointN( | |
way, | |
generate_series(1, ST_NPoints(way)) | |
) | |
) | |
FROM ( | |
SELECT (ST_Dump(way)).geom AS way | |
FROM planet_osm_line WHERE osm_id=25813470) AS dumped; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
P900913="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs" | |
EXTENT="-180 -85.05112878 180 85.05112878" | |
ogr2ogr --config PG_USE_COPY YES --config OGR_ENABLE_PARTIAL_REPROJECTION TRUE --config SHAPE_ENCODING WINDOWS-1252 -t_srs "$P900913" -lco ENCODING=UTF-8 -lco SRID=900913 -clipsrc $EXTENT -segmentize 1 -skipfailures -f PGDump /vsistdout/ ne_10m_populated_places.shp | pv | psql -d natural_earth -q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
raster2pgsql -s 900913 -l 2,4,8 -d -I -Y -t 4096x4096 n43w125-900913.tiff ned | pv | psql -d scratch | |
gdalinfo "PG:host=localhost port=5432 dbname=scratch user=seth table=ned mode=2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cache": | |
{ | |
"class": "SparseCache", | |
"kwargs": { | |
"path": "/tmp/stache", | |
"umask": "0000", | |
"empty_size": 334 | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy | |
arcpy.UpgradeGDB_management("z:/data/workspace/huc02/nhdh0202.gdb", "PREREQUISITE_CHECK", "UPGRADE") |