View test.py
#!/usr/bin/env python
import subprocess
def _main():
source_image = "source.tiff"
subprocess.call("gdalwarp -t_srs epsg:3857 -r cubic " + source_image + " pre-import.tiff", shell=True)
import fiona
subprocess.call("gdalwarp -t_srs epsg:3857 -r cubic " + source_image + " post-import.tiff", shell=True)
View StyleTemplate.json
{
"version": 8,
"name": "OpenHuntingData",
"center": [
-118.291995,
36.578581
],
"zoom": 12,
"bearing": 0,
"pitch": 0,
View set_s3_metadata.py
#!/usr/bin/env python
import logging
from optparse import OptionParser
import os
from urlparse import urlparse
from boto.s3.connection import S3Connection
def _main():
View sort_last_token.py
#!/usr/bin/env python
import sys
seperator = " "
def getLastToken(item):
return item.split(seperator)[-1].replace("*", "")
lines = []
for line in sys.stdin:
View betterthanboto.py
from boto.cloudfront.distribution import Distribution
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
import base64
class BetterThanBoto(Distribution):
def sign_rsa(self, message):
View process.sh
#!/bin/bash
set -e -u
wget https://data.fs.usda.gov/geodata/edw/edw_resources/shp/S_USA.Road_MVUM.zip
wget https://data.fs.usda.gov/geodata/edw/edw_resources/shp/S_USA.Trail_MVUM.zip
unzip S_USA.Road_MVUM.zip
unzip S_USA.Trail_MVUM.zip
TRAILS_MBTILES=`pwd`/trails.mbtiles
ROADS_MBTILES=`pwd`/roads.mbtile
View check_urls.py
#!/usr/bin/env python
import logging
from optparse import OptionParser
import os
import requests
import sys
def check_urls_from_file(f):
statuses = {}
View gist:46436874baef539e587c7033bea1f5c5
file=merge.shp
SRS=epsg:4326
for i in boundary/**/*.shp
do
if [ ! -e "$file" ]
then
echo "creating $file"
ogr2ogr -t_srs $SRS -f 'ESRI Shapefile' $file $i
else
echo "merging $i into $file"
View tilenames.py
#!/usr/bin/env python
#-------------------------------------------------------
# Translates between lat/long and the slippy-map tile
# numbering scheme
#
# http://wiki.openstreetmap.org/index.php/Slippy_map_tilenames
#
# Written by Oliver White, 2007
# This file is public-domain
#-------------------------------------------------------
View localconfig.js
exports.LocalConfig = function (localizer, project) {
var mode = process.env.SOURCE_OVERRIDE;
if(mode == "local_composite") {
project.mml.source[0] = {
protocol: "http:",
tilejson: "http://localhost:8080/meters/index.json"
}
} else if(mode == "local_source") {
project.mml.source[0] = {
protocol: "tmsource:",