Skip to content

Instantly share code, notes, and snippets.

View andrewharvey's full-sized avatar

Andrew Harvey andrewharvey

View GitHub Profile
@andrewharvey
andrewharvey / geojsonDumbMerge.sh
Created May 4, 2018 12:11
Hacky low memory geojson merge for when geojson-merge -s just isn't working
#!/bin/sh
echo '{"type": "FeatureColletion", "features": [' > head.json
echo ']}' > foot.json
echo ',' > comma.txt
for f in *.geojson.gz ; do cat $f | gunzip | tail -n+2 | head -n -1 | cat - comma.txt > tmp/$f ; done
cat head.json tmp/* | head -c -4 | cat - foot.json > merged.geojson
@andrewharvey
andrewharvey / main.geojson
Created March 15, 2018 06:44
geojson sample which breaks turf.mask
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewharvey
andrewharvey / polygon-with-a-hole.geojson
Created March 10, 2018 02:21
A GeoJSON Polygon with a hole
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewharvey
andrewharvey / island-inside-hole-polygon.geojson
Last active July 10, 2018 13:18
An island within a hole in a polygon in GeoJSON
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.
@andrewharvey
andrewharvey / index.html
Created January 24, 2018 23:51
Create a hover effect // source https://jsbin.com/cuvoper
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Create a hover effect</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://www.alantgeo.com.au/share/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.43.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@andrewharvey
andrewharvey / index.html
Last active June 11, 2018 09:36
Mapbox GL Geocoder without camera animation
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Add a geocoder</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.43.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.43.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@andrewharvey
andrewharvey / index.html
Last active January 10, 2018 02:53 — forked from danswick/index.html
Mapbox GL JS Symbol Bounce
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.2/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.2/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@andrewharvey
andrewharvey / index.html
Created December 13, 2017 12:49
Add dome in Mapbox GL JS using a hex grid and polygon extrusions
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Add dome in Mapbox GL JS using a hex grid and polygon extrusions</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.42.2/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.42.2/mapbox-gl.css' rel='stylesheet' />
<script src='https://npmcdn.com/@turf/turf/turf.min.js'></script>
<style>
@andrewharvey
andrewharvey / README.md
Created November 2, 2017 06:03
Thoughts about Sydney and Parramatta as Suburbs in OSM