Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Martin Raifer tyrasd

🏠
Working from home
View GitHub Profile
@tyrasd
tyrasd / index.js
Created Jun 8, 2021
overpass turbo URL shortener
View index.js
var http = require('http');
var url = require('url');
var redis = require('redis');
var base62 = require('base62');
var db = redis.createClient("/var/run/redis/redis-server.sock");
http.createServer(function (req, res) {
if (req.method == "OPTIONS") {
res.writeHead(200, {
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View big.css
@font-face {
font-family: 'Rubik';
font-style: normal;
font-weight: 400;
src:
local('Rubik'),
local('Rubik-Regular'),
url('./rubik-v4-latin-regular.woff2') format('woff2'),
url('./rubik-v4-latin-regular.woff') format('woff');
}
@tyrasd
tyrasd / index.html
Last active May 12, 2021
minimal Overpass Leaflet example
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Example: Overpass-API with Leaflet.js</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
<style>
body {
padding: 0;
@tyrasd
tyrasd / index.html
Created Apr 12, 2017 — forked from anonymous/index.html
Empty Style
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Empty Style Preview</title>
<link rel="stylesheet" type="text/css" href="https://api.mapbox.com/mapbox-gl-js/v0.28.0/mapbox-gl.css" />
<script src="https://api.mapbox.com/mapbox-gl-js/v0.28.0/mapbox-gl.js"></script>
<style>
@tyrasd
tyrasd / index.html
Last active Apr 17, 2017 — forked from anonymous/index.html
st flurnamen
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>st-flurnamen Preview</title>
<link rel="stylesheet" type="text/css" href="https://api.mapbox.com/mapbox-gl-js/v0.35.1/mapbox-gl.css" />
<script src="https://api.mapbox.com/mapbox-gl-js/v0.35.1/mapbox-gl.js"></script>
<style>
body { margin:0; padding:0; background-color:black; }
@tyrasd
tyrasd / index.html
Last active Jan 23, 2017 — forked from milkbread/index.html
JavaScript: Convert GeoJSON Polygon to WKT
View index.html
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<title>Convert GeoJSON</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="poly.js"></script>
</head>
@tyrasd
tyrasd / _results-20161205.csv
Last active Jan 9, 2017
list of descending timestamps between ascending versions of an osm object (based on history-161205.osm.pbf)
View _results-20161205.csv
type id version
node 334489687 3
node 354919611 5
node 1138179775 4
node 1429840833 5
node 1470794747 2
node 1472871495 2
node 1478934528 2
node 1485196779 2
node 1487705069 2
@tyrasd
tyrasd / clockwise.geojson
Created Nov 13, 2016
examples of clockwise / counterclockwise winding of GeoJSON Polygon geometries
View clockwise.geojson
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 Aug 16, 2017
osm-analytics server setup walkthrough
View readme.md

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