Skip to content

Instantly share code, notes, and snippets.

@tyrasd
tyrasd / clockwise.geojson
Created November 13, 2016 21:00
examples of clockwise / counterclockwise winding of GeoJSON Polygon geometries
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tyrasd
tyrasd / readme.md
Last active August 16, 2017 10:03
osm-analytics server setup walkthrough

Cruncher

  • install node/npm, curl
  • compile and install tippecanoe (version 1.8.1 works, not sure about newer releases)
  • download run.sh from cruncher repo and chmod +x it
  • replace osmqatiles-planet url with the extract you want
  • adjust paths in run.sh (and mkdir the respective working directories)
  • comment out hotprojects.sh (would fail because it requires valid AWS credentials to upload stuff into a hardcoded bucket).
  • comment out the forever restart … lines (requires a tile-serving script to be already running)
  • execute run.sh -> … -> two .mbtiles files in results directory
@tyrasd
tyrasd / user.js
Last active June 13, 2016 22:03
tampermonkey script to make http://www.provinz.bz.it/wetter/niederschlagsvorhersage.asp more interactive
// ==UserScript==
// @name improved interactivity for provinz.bz.it/wetter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description makes http://www.provinz.bz.it/wetter/niederschlagsvorhersage.asp more interactive
// @author Martin Raifer <[email protected]>
// @match http://www.provinz.bz.it/wetter/niederschlagsvorhersage.asp
// @grant none
// ==/UserScript==
@tyrasd
tyrasd / README.md
Last active February 2, 2016 15:25
🚲 Bikeability Index Graz – http://bl.ocks.org/tyrasd/f60119bbd9105154d872/
@tyrasd
tyrasd / map.geojson
Last active February 1, 2016 08:11
generalized boundary of South Tyrol (approx 0.2km resolution)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tyrasd
tyrasd / map.geojson
Last active December 13, 2015 08:33 — forked from anonymous/map.geojson
tiles of osm-qa-tiles "italy" extract
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

modified version of http://bl.ocks.org/curran/01aa2685f083b6c1b9fb with the map's bounding box on the globe

original readme follows:

--

Pan and zoom in the map on the left to rotate the globe.

Click and drag the globe to pan on the map.

@tyrasd
tyrasd / index.html
Last active January 9, 2016 21:54
compares OSM-Carto with the older "Mapnik" style via openstreetmap.nl tiles http://bl.ocks.org/tyrasd/raw/67a00dbb869456094373
<!DOCTYPE html>
<html>
<head>
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
@tyrasd
tyrasd / index.js
Created January 14, 2015 11:29
check if two GeoJSON geometries are equal
function equals(g1,g2) {
function _equalCoords(c1,c2) {
if (typeof c1 === 'number')
return c1===c2;
else
if (Array.isArray(c1) && Array.isArray(c2) && c1.length===c2.length)
return c1.reduce(function(memo, val, index) {
return memo && _equalCoords(c1[index], c2[index]);
}, true);
else