Skip to content

Instantly share code, notes, and snippets.

View rowanwins's full-sized avatar
🌐
Making maps

Rowan Winsemius rowanwins

🌐
Making maps
  • Canberra, Australia
View GitHub Profile
@rowanwins
rowanwins / gist:fae3bd7e6f9831e27b72
Created February 3, 2016 23:26
Tile server load testing results
//NODE, MBTILES AND EXPRESS TILE SERVER WITH 200 CONCURRENT REQUESTS FOR 20seconds
Target URL: http://localhost:7777/scene/tiles/15/29987/19801.png
Completed requests: 7568
Total errors: 0
Total time: 20.001499538 s
Requests per second: 378
Total time: 20.001499538 s
Percentage of the requests served within a certain time
50% 518 ms
90% 556 ms
@rowanwins
rowanwins / gist:60d8bac05a28c2874909
Created September 2, 2015 23:32
NVDI Raster Calculator
(Float("NIR.TIF") - Float("RED.TIF")) / (Float("NIR.TIF") + Float("RED.TIF"))
@rowanwins
rowanwins / gist:6e257c20138360a9f622
Created August 20, 2015 05:48
Visible atmospherically resistant index for Raster Calculator
("Green" - "Red")/("Green" + "Red" - "Blue")
@rowanwins
rowanwins / gist:b1991a57cd59ec6a265c
Created May 28, 2015 22:50
Adding transition to polygon fill in leaflet
.leaflet-container path{
transition: fill .75s;
}
@rowanwins
rowanwins / Limiting Leaflet.draw to a single feature
Last active September 3, 2016 06:08
Limiting Leaflet.draw
<!DOCTYPE html>
<html>
<head>
<title>Leaflet.draw drawing and editing tools</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link rel="stylesheet" href="js/leaflet.draw.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
@rowanwins
rowanwins / index.js
Created September 20, 2016 10:01
WOF post code script
var shp = require('shpjs');
var walk = require('walk')
var fs = require('fs')
var turfArea = require('turf-area')
var turfBbox = require('turf-bbox')
var turfCentroid = require('turf-centroid')
var newSrcData = fs.readFileSync(__dirname +"/src/ABS_Postcodes.geojson", 'utf8');
newSrcData = JSON.parse(newSrcData);
@rowanwins
rowanwins / turf-shapely.py
Last active June 17, 2017 14:55
Test turf/boolean modules against shapely
from shapely.geometry import asShape
import fiona
import os
import sys
turf_dir = sys.argv[1]
predicate = sys.argv[2]
def runTestOnFile(dir, file, turfResult):
fc = fiona.open(dir + file, 'r')
@rowanwins
rowanwins / fc.geojson
Created December 18, 2018 10:19
Massive Feature Collection
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rowanwins
rowanwins / fc.geojson
Created December 18, 2018 12:35
Simplified FeatureCollection
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rowanwins
rowanwins / sample.geojson
Created February 28, 2019 02:14
mismatchingBaseZ
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.