Skip to content

Instantly share code, notes, and snippets.

@tyrasd
tyrasd / index.js
Created November 22, 2013 10:37
Gist from mistakes.io
// You can include libraries in mistakes
// with a magic function called require(),
// which simply loads javascript in a script tag.
require('https://raw.github.com/lodash/lodash/2.3.0/dist/lodash.js');
require('https://raw.github.com/tyrasd/osmtogeojson/gh-pages/osmtogeojson.js');
osmtogeojson(
{elements:[{type:"node",id:"-1",lat:1.23,lon:3.21}]},
{flatProperties:true}
@tyrasd
tyrasd / cgi-bin
Last active December 26, 2015 14:39 — forked from tyrasd/cgi-bin
geojson output cgi-bin script for Overpass-API
#!/usr/bin/env bash
# Copyright 2008, 2009, 2010, 2011, 2012 Roland Olbricht
#
# This file is (not yet) part of Overpass_API
#
# Overpass_API is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
@tyrasd
tyrasd / cgi-bin
Last active December 26, 2015 14:39 — forked from hjanetzek/gist:5521755
pbf output cgi-bin script for overpass-api
#!/usr/bin/env bash
# Copyright 2008, 2009, 2010, 2011, 2012 Roland Olbricht
#
# This file is (not yet) part of Overpass_API
#
# Overpass_API is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
@tyrasd
tyrasd / index.html
Last active December 26, 2015 13:09
slippy map for basemap.at tiles
<!DOCTYPE html>
<html>
<head>
<title>basemap.at</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.2/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.2/leaflet.ie.css" /><![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.6.2/leaflet-src.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@tyrasd
tyrasd / forest.geojson
Created October 22, 2013 19:53
a large forest multipolygon
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tyrasd
tyrasd / index.html
Last active January 9, 2016 21:56 — forked from tmcw/index.html
compares OSM-Carto with the older "Mapnik" style. http://bl.ocks.org/tyrasd/raw/6164696
<!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 / README.md
Last active May 9, 2022 18:08
This is how I've visualized OpenStreetMap's node density.
  1. download the source data

     wget http://fred.dev.openstreetmap.org/density/tiles.13
     wget http://fred.dev.openstreetmap.org/density/tiles.16
    
  2. convert to simple, gnuplot-readable text format

     sed 's/\([0-9]*\) z=\([0-9]*\) x=\([0-9]*\) y=\([0-9]*\)/\3 \4 \1/' < tiles.13 > tiles.13.txt
     sed 's/\([0-9]*\) z=\([0-9]*\) x=\([0-9]*\) y=\([0-9]*\)/\3 \4 \1/' < tiles.16 > tiles.16.txt
    
@tyrasd
tyrasd / index.html
Last active March 28, 2016 11:50
A list of some interesting WMS-Services of the Province of Bolzano/Bozen (Italy). With links for JOSM, iD and Potlach.
<html>
<head>
<title>South Tyrol govenment WMS-Layers</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
</head>
<body>
<h1>A list of a few interesting WMS-Layers of the South Tyrolean government.</h1>
<p>See <a href="http://geocatalogo.retecivica.bz.it/geokatalog/">Geokatalog</a> for more layers and data sets.</p>
<p>Licence either CC0 or CC-BY 3.0 (&copy; Province of Bolzano/Bozen).</p>
<h2 style="clear:right;">TOPOMAP</h2>
@tyrasd
tyrasd / index.html
Last active December 16, 2015 22:49
compare osm with province BZ data
<!DOCTYPE html>
<!-- this document under WFTPL -->
<!-- this document shows data from various sources (OSM data under ODbL, data from province of Bolzano / Italy (unknown licence) -->
<html>
<head>
<title>compare osm with province BZ data</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">