Skip to content

Instantly share code, notes, and snippets.

@buma
buma / map_bug.osm
Created September 4, 2019 11:03
File with bug
<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="osmium/1.10.0">
<bounds minlat="64.13603" minlon="25.37173" maxlat="64.13801" maxlon="25.37671"/>
<node id="5021809324" version="2" timestamp="2019-07-07T09:12:37Z" uid="9538095" user="Tuovi" changeset="71976961" lat="64.1370366" lon="25.374004"/>
<node id="5021809325" version="1" timestamp="2017-08-08T09:01:21Z" uid="28091" user="nixe" changeset="50937992" lat="64.13699" lon="25.3733938"/>
<node id="5021809326" version="1" timestamp="2017-08-08T09:01:21Z" uid="28091" user="nixe" changeset="50937992" lat="64.1368121" lon="25.3734685"/>
<node id="5021809327" version="2" timestamp="2019-07-07T09:12:37Z" uid="9538095" user="Tuovi" changeset="71976961" lat="64.1368585" lon="25.3740873"/>
<node id="6749025848" version="1" timestamp="2019-08-27T06:09:18Z" uid="28091" user="nixe" changeset="73778743" lat="64.1365233" lon="25.3743117"/>
<node id="6749025849" version="1" timestamp="2019-08-27T06:09:18Z" uid="28091" user="nixe" changeset
# Slovenian translations for PACKAGE package.
# Copyright (C) 2018 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Marko Burjek <mabu@localhost>, 2018.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-17 22:04+0200\n"
{
"mjolnir": {
"max_cache_size": 1000000000,
"tile_dir": "/data/valhalla",
"admin": "/data/valhalla/admin.sqlite",
"timezone": "/data/valhalla/tz_world.sqlite",
"transit_dir": "/data/valhalla/transit",
"logging": {
"type": "std_out",
"color": true
@buma
buma / _statistics.md
Last active October 20, 2016 10:08
OSM restriction statistics

I did some statistics over whole OSM with help of osmium. Restriction types are NO (no_right/left/U/straight) only (only_right/left/straight), no exit/entry and unknown where it wasn't possible to figure out restriction.

Script only reads relations with type=restriction and which have restriction tag. This includes most of restrictions but skips transport specific ones like type=restriction:hgv, type=restriction:motorcar and restriction:hgv=only_right_turn.

I found 574 028 restrictions with type=restriction and some restriction. Out of this 17 098 are invalid. Some don't have from/to ways, or just one of them some have multiple from/to ways where only one is permitted (except no exit/entry)

diff --git a/.gitignore b/.gitignore
index 9158691..eea1dfd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,8 @@ hs_err_pid*
cache
*.iml
src/main/resources/git.properties
+*.json
+*.geojson
Section "Device"
Identifier "Intel Ivybridge "
Driver "intel"
# Using the name of the output defined by the video driver plus the identifier of a
-- xmonad config used by Vic Fryzel
-- Author: Vic Fryzel
-- http://github.com/vicfryzel/xmonad-config
import System.IO
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.SetWMName
useGTFSShapeInLinker: true,
visualizeWayPermissions: true,
staticBikeRental: true,
areaVisibility: true,
htmlAnnotations: true,
speeds:{
units:"km/h",
values:{
"highway=motorway": 130,
@buma
buma / introspection.json
Created February 4, 2016 08:41
Introspection response which causes a bug
{
"data": {
"__schema": {
"queryType": {
"name": "QueryType"
},
"mutationType": null,
"subscriptionType": null,
"types": [
{
@buma
buma / MyEnumSetListSerializer.java
Created November 25, 2015 17:17
custom FST serializers
package com.conveyal.r5;
import org.nustaq.serialization.FSTClazzInfo;
import org.nustaq.serialization.FSTObjectInput;
import org.nustaq.serialization.FSTObjectOutput;
import org.nustaq.serialization.serializers.FSTArrayListSerializer;
import java.io.IOException;
import java.util.ArrayList;
import java.util.EnumSet;