View split.py
#!/usr/bin/env python
import logging
from optparse import OptionParser
import os
import gpxpy
import gpxpy.gpx
def split_gpx(source, dest_dir, max_segment_points=500):
View aws.conf
[plugins]
cwlogs = cwlogs
[default]
region = ap-southeast-2
View build-gdal-combined-lib.sh
#!/bin/bash
PREFIX=`pwd`/install/
rm -rf $PREFIX
mkdir $PREFIX
LOG=./log
rm -rf $LOG
mkdir $LOG
if [ -e ${PREFIX} ]
then
View bil-to-hgt.sh
#!/bin/bash
function gdal_pixel_count() {
if [ -z "$1" ]; then
echo "Missing arguments. Syntax:"
echo " gdal_extent <input_raster>"
return
fi
EXTENT=$(gdalinfo $1 |\
grep "Size is" |\
sed "s/Size is //g;s/,//;s/\n//")
View ogr_value_summary.py
#!/usr/bin/env python
import logging
from optparse import OptionParser
import os
from osgeo import ogr
def log_file_fields(filename):
print("File: " + filename)
source = ogr.Open(filename)
View load.py
#!/usr/bin/env python3
import os
import psycopg2
import re
import sys
from urllib.parse import urlparse
try:
conn = psycopg2.connect(dbname=os.environ.get("DB"), user=os.environ.get("DB_USER"), host=os.environ.get("DB_HOST"))
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 function.js
var AWS = require('aws-sdk');
var url = require('url');
var https = require('https');
var hookUrl, kmsEncyptedHookUrl, slackChannel;
kmsEncyptedHookUrl = ''; // Enter the base-64 encoded, encrypted key (CiphertextBlob)
slackChannel = '#alerts'; // Enter the Slack channel to send a message to
View cleanup_edges.py
#!/usr/bin/env python
import numpy
import sys
import gdal
def cleanup_edges(source, nodata_value, mask_filename="mask.tiff"):
band_data = source.GetRasterBand(1).ReadAsArray()
y_size, x_size = band_data.shape
View publish_queue_size.py
#!/usr/bin/env python
from __future__ import with_statement, print_function
from pyrabbit.api import Client
from boto.ec2.cloudwatch import CloudWatchConnection
import os
from time import sleep
def get_queue_depths(host, username, password, vhost):
cl = Client(host, username, password)