Skip to content

Instantly share code, notes, and snippets.

@nrenner
nrenner / grid.js
Created February 5, 2021 14:50
BRouter rd5 grid
var fs = require("fs"),
topojson = require("topojson"),
filesize = require('file-size');
// https://brouter.de/brouter/segments4/
var path = 'Index of _brouter_segments4_.html',
gridSize = 5; // degrees
var entryList = [];
@nrenner
nrenner / README.md
Last active September 4, 2019 09:35
semicolon.awk - find MAPS.ME edits that removed elements from multi value list

semicolon.awk

Finds MAPS.ME edits that removed elements from multi value list, i.e. tags with multiple values separated by semicolon (";").

Uses changesets dump from planet.openstreetmap.org and full history extract from Geofabrik, both pre-filtered and converted to the Osmium Tool OPL Format.

To get edits by MAPS.ME, the changesets dump is filtered by the created_by tag and later matched by changeset ID with the full history file.

Requires:

  • Osmium Tool >= 1.7.0 (because of bbox for changeset-filter), tested with v1.10.0 (built from source)
@nrenner
nrenner / MarkerHash.js
Created April 27, 2017 14:49
Extending leaflet-fullHash - Marker
L.MarkerHash = function(map, options, marker) {
this.marker = marker;
L.Hash.call(this, map, options);
};
L.MarkerHash.prototype = L.Util.create(L.Hash.prototype);
L.MarkerHash.prototype.constructor = L.MarkerHash;
L.Util.extend(L.MarkerHash.prototype, {
@nrenner
nrenner / MyHash.js
Created April 27, 2017 14:44
Extending leaflet-fullHash
L.MyHash = function(map, options) {
L.Hash.call(this, map, options);
};
L.MyHash.prototype = L.Util.create(L.Hash.prototype);
L.MyHash.prototype.constructor = L.MyHash;
L.Util.extend(L.MyHash.prototype, {
parseHash: function(hash) {
console.log('parseHash: ' + hash);
@nrenner
nrenner / OverPassLayer.css
Created August 21, 2015 10:28
OverPassLayer return bug test
.leaflet-control-minZoomIndicator {
font-size: 2em;
background: #ffffff;
background-color: rgba(255,255,255,0.7);
border-radius: 10px;
padding: 1px 15px;
opacity: 0.5;
}
@nrenner
nrenner / OverPassLayer.css
Created August 20, 2015 15:06
OverPassLayer debug page
.leaflet-control-minZoomIndicator {
font-size: 2em;
background: #ffffff;
background-color: rgba(255,255,255,0.7);
border-radius: 10px;
padding: 1px 15px;
opacity: 0.5;
}
@nrenner
nrenner / index.html
Last active December 26, 2019 23:20
BRouter estimated_traffic_class
<!DOCTYPE html>
<html lang="en">
<head>
<title>BRouter estimated_traffic_class</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<style type="text/css">
body {
margin: 0;
@nrenner
nrenner / index.html
Created January 24, 2015 12:12
Mapsforge Tile Server - OL3
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="http://openlayers.org/en/v3.1.1/css/ol.css" type="text/css">
<style>
body {
margin: 0;
}
html, body, .map {
height: 100%;
@nrenner
nrenner / index.html
Last active December 26, 2019 23:17
OSM PBF + osmtogeojson test
<!DOCTYPE html>
<html>
<head>
<title>OSM PBF to GeoJSON example (osm-read + osmtogeojson)</title>
<meta charset="utf-8"/>
</head>
<body>
<pre id="log" style="max-height: 480px; overflow-y: auto;"></pre>