This guide assumes a fresh install of Mac OSX 10.7 Lion.
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
#!/usr/bin/env ruby | |
# Script to import tumblr posts into local markdown posts ready to be consumed by Jekyll. | |
# Inspired by New Bamboo's post http://blog.new-bamboo.co.uk/2009/2/20/migrating-from-mephisto-to-jekyll | |
require 'rubygems' | |
require 'open-uri' | |
require 'nokogiri' | |
# Configuration |
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
# Download all current FAA sectional GeoTIFFs (zipped) | |
import urllib, os, csv | |
from lxml.html.soupparser import fromstring | |
FAA_CHART_URL = 'http://aeronav.faa.gov/index.asp?xml=aeronav/applications/VFR/chartlist_sect' | |
BASE_CONTENT_URL = 'http://aeronav.faa.gov/' | |
DOWNLOAD_DIR = 'download' | |
data = urllib.urlopen(FAA_CHART_URL).read() |
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
#! /usr/bin/env python | |
from geoserver.catalog import Catalog | |
cat = Catalog('http://host/geoserver/rest', 'user', 'password') | |
def internal_name(s): | |
return s.startswith("__") and s.endswith("__") | |
def check(x): |
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
require 'formula' | |
class Mapnik2 < Formula | |
head 'http://svn.mapnik.org/trunk/', :using => :svn | |
homepage 'http://www.mapnik.org/' | |
depends_on 'pkg-config' => :build | |
depends_on 'scons' => :build | |
depends_on 'libtiff' | |
depends_on 'jpeg' |
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
-# This comment can be | |
split up in multiple lines just | |
by indentation! | |
Mike | |
doesn't | |
like | |
these | |
comments | |
. |
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
#!/bin/bash | |
set -e | |
# Initialize timestamp with day of latest planet dump | |
# Setting to midnight ensures we get conistent data after first run | |
# osmosis --read-replication-interval-init | |
OSMOSIS_PATH=/home/iandees/osmosis-SNAPSHOT-r25995 | |
OSMOSIS_WORKDIR=/home/iandees/.osmosis | |
OSM2PGSQL_PATH=/home/iandees/osm2pgsql |
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
from geonode.core.models import AUTHENTICATED_USERS, ANONYMOUS_USERS | |
def restrict(item): | |
"""Works with GeoNode Map and Layer objects to disable unauthenticated access. | |
""" | |
item.set_gen_level(ANONYMOUS_USERS, item.LEVEL_NONE) | |
item.set_gen_level(AUTHENTICATED_USERS, item.LEVEL_READ) | |
def publish(item): | |
"""Works with GeoNode Map and Layer objects to enable unauthenticated access. |
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
#!/bin/sh | |
export GDAL_TIFF_INTERNAL_MASK=YES | |
nearblack -co TILED=YES -setmask -nb 0 -of GTiff -o ./prewarp.tif $1 | |
gdalwarp -co TILED=YES -dstalpha -t_srs EPSG:4326 prewarp.tif warped.tif | |
rm prewarp.tif | |
gdal_translate -co TILED=YES -co JPEG_QUALITY=80 -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -b 1 -b 2 -b 3 -mask 4 warped.tif final.tif | |
rm warped.tif | |
gdaladdo final.tif 2 4 8 16 32 64 128 256 | |
mv final.tif ${1}_converted.tif |
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
#!/bin/sh | |
export GDAL_TIFF_INTERNAL_MASK=YES | |
for f in /media/LAR_HD/6Inch/*.tif | |
do | |
nearblack -co TILED=YES -setmask -nb 0 -of GTiff -o ./prewarp.tif $f | |
gdalwarp -co TILED=YES -dstalpha -s_srs EPSG:2229 -t_srs EPSG:4326 prewarp.tif warped.tif | |
rm prewarp.tif | |
gdal_translate -co TILED=YES -co JPEG_QUALITY=80 -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -b 1 -b 2 -b 3 -mask 4 warped.tif final.tif |
OlderNewer