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 / 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.
@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 / 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 / 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 / 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 / gist:97188a36a10ea3143b13
Created March 22, 2016 22:09
Layer toggle with layer group
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Demo</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:600' rel='stylesheet' type='text/css'>
<style>
@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:120bf64470c89cd191a2
Created June 10, 2015 10:37
Use ogr2ogr to import shp to MySQL
ogr2ogr -f "MySQL" MYSQL:"dbName,host=localhost,user=root,port=3306" -nln "tableName" -a_srs "EPSG:4326" shpName.shp -lco ENGINE=MyISAM