Skip to content

Instantly share code, notes, and snippets.

View apburnes's full-sized avatar
🌵
In the desert

Andrew Burnes apburnes

🌵
In the desert
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am apburnes on github.
  • I am apburnes (https://keybase.io/apburnes) on keybase.
  • I have a public key ASCN90CkZv0_AR9qiCr0Skm29HSz-u7OmNG6EpR8SouF1Ao

To claim this, I am signing this object:

@apburnes
apburnes / style.json
Created June 7, 2017 04:29 — forked from anonymous/style.json
fansee-test-lakers
{
"version": 8,
"name": "fansee-test-lakers",
"metadata": {
"mapbox:autocomposite": true,
"mapbox:type": "template"
},
"sources": {
"tilezen": {
"type": "vector",
@apburnes
apburnes / README.md
Created June 10, 2016 16:45 — forked from aaronpdennis/README.md
Processing Planet.osm and serving HDM vector tiles.

Building and Updating a Global HDM Vector Tile Source from OSM Data

The Mapbox Studio style hdm-style.tm2 is a humanitarian map design that relies on three vector tile sources, two of which are hosted and served by Mapbox:

  1. Mapbox Streets
  2. Mapbox Terrain
  3. Humanitarian Data Model vector tiles

The third source is the focus of this writeup. Currently, hdm-style.tm2 uses a hand-processed, non-updating snapshot of HDM vector tiles for small subregions of the world. This gist explains in rough psuedocode and theory how you could set up a HDM vector tiles source that would update hourly (or minutely or daily) from the OSM database and cover the entire planet.

@apburnes
apburnes / README.md
Created May 25, 2016 03:41
line-intersection

The Bentley–Ottmann algorithm finds all the intersections that occur in a set of line segments. Drag the endpoints of the line to move, click to add and right click to remove.

Instead of calculating the intersection of every pair of segments, which would require O(n²) comparisons for a set of n lines, the algorithm uses a sweep line. Starting at the top of the screen and moving down, it keeps track of the order of the lines' x positions at the current y position (represented by the figure on the right). As lines start, end or intersect, new pairs of lines become adjacent in the x ordering and are checked for intersections.

A set of lines with I intersections ends up only requiring O(n log n + I log n) operations. Computational Geometry: Algorithms and Applications, chapter 2 has a proof and a more detailed explanation.

forked from 1wheel's block:

@apburnes
apburnes / README.md
Created May 25, 2016 00:33
line-intersection

The Bentley–Ottmann algorithm finds all the intersections that occur in a set of line segments. Drag the endpoints of the line to move, click to add and right click to remove.

Instead of calculating the intersection of every pair of segments, which would require O(n²) comparisons for a set of n lines, the algorithm uses a sweep line. Starting at the top of the screen and moving down, it keeps track of the order of the lines' x positions at the current y position (represented by the figure on the right). As lines start, end or intersect, new pairs of lines become adjacent in the x ordering and are checked for intersections.

A set of lines with I intersections ends up only requiring O(n log n + I log n) operations. Computational Geometry: Algorithms and Applications, chapter 2 has a proof and a more detailed explanation.

forked from 1wheel's block:

@apburnes
apburnes / README.md
Created May 25, 2016 00:33
line-intersection

The Bentley–Ottmann algorithm finds all the intersections that occur in a set of line segments. Drag the endpoints of the line to move, click to add and right click to remove.

Instead of calculating the intersection of every pair of segments, which would require O(n²) comparisons for a set of n lines, the algorithm uses a sweep line. Starting at the top of the screen and moving down, it keeps track of the order of the lines' x positions at the current y position (represented by the figure on the right). As lines start, end or intersect, new pairs of lines become adjacent in the x ordering and are checked for intersections.

A set of lines with I intersections ends up only requiring O(n log n + I log n) operations. Computational Geometry: Algorithms and Applications, chapter 2 has a proof and a more detailed explanation.

forked from 1wheel's block:

@apburnes
apburnes / README.md
Created May 25, 2016 00:22
line-intersection

The Bentley–Ottmann algorithm finds all the intersections that occur in a set of line segments. Drag the endpoints of the line to move, click to add and right click to remove.

Instead of calculating the intersection of every pair of segments, which would require O(n²) comparisons for a set of n lines, the algorithm uses a sweep line. Starting at the top of the screen and moving down, it keeps track of the order of the lines' x positions at the current y position (represented by the figure on the right). As lines start, end or intersect, new pairs of lines become adjacent in the x ordering and are checked for intersections.

A set of lines with I intersections ends up only requiring O(n log n + I log n) operations. Computational Geometry: Algorithms and Applications, chapter 2 has a proof and a more detailed explanation.

forked from 1wheel's block:

@apburnes
apburnes / README.md
Created May 25, 2016 00:21
line-intersection

The Bentley–Ottmann algorithm finds all the intersections that occur in a set of line segments. Drag the endpoints of the line to move, click to add and right click to remove.

Instead of calculating the intersection of every pair of segments, which would require O(n²) comparisons for a set of n lines, the algorithm uses a sweep line. Starting at the top of the screen and moving down, it keeps track of the order of the lines' x positions at the current y position (represented by the figure on the right). As lines start, end or intersect, new pairs of lines become adjacent in the x ordering and are checked for intersections.

A set of lines with I intersections ends up only requiring O(n log n + I log n) operations. Computational Geometry: Algorithms and Applications, chapter 2 has a proof and a more detailed explanation.

forked from 1wheel's block: