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 click | |
import rasterio as rio | |
@click.command() | |
@click.argument('src_path', type=click.Path(exists=True)) | |
@click.argument('dst_path', type=click.Path(exists=False)) | |
def to_png(src_path, dst_path): | |
with rio.drivers(): |
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 -eou pipefail | |
function usage() { | |
echo "" | |
echo "Utility for generating preview images and uploading to S3. This script is meant to be" | |
echo "used in a remote environment (e.g. EC2). The environment variable WORKING_BUCKET must be" | |
echo "defined to an S3 bucket, of which you have access." | |
echo "" |
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
var gdal = require('gdal'); | |
module.exports = {}; | |
module.exports.reproject = reproject; | |
var dstwkt = "PROJCS['WGS 84 / Pseudo-Mercator', GEOGCS['WGS 84', DATUM['WGS_1984', SPHEROID['WGS 84',6378137,298.257223563, AUTHORITY['EPSG','7030']], AUTHORITY['EPSG','6326']], PRIMEM['Greenwich',0], UNIT['degree',0.0174532925199433], AUTHORITY['EPSG','4326']], PROJECTION['Mercator_1SP'], PARAMETER['central_meridian',0], PARAMETER['scale_factor',1], PARAMETER['false_easting',0], PARAMETER['false_northing',0], UNIT['metre',1, AUTHORITY['EPSG','9001']], EXTENSION['PROJ4','+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 +wktext +no_defs'], AUTHORITY['EPSG','3857']]"; | |
var proj4wm = "+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 +wktext +no_defs"; | |
function reproject(srcpath, dstpath, callback) { |
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 sys | |
import numpy as np | |
import rasterio as rio | |
def compare(srcpath1, srcpath2): | |
with rio.drivers(): | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 node | |
var turf = require('turf'); | |
function usage() { | |
console.log('Usage: ./buffer-point [lat] [lng] [distance]\n'); | |
} | |
process.argv.shift(); | |
process.argv.shift(); |