Skip to content

Instantly share code, notes, and snippets.

View kapadia's full-sized avatar
💭
eating a pecan bar

Amit Kapadia kapadia

💭
eating a pecan bar
View GitHub Profile
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) {
@kapadia
kapadia / compare_geotiffs.py
Last active August 29, 2015 14:14
Compare geotiffs
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.
#!/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();
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.