Skip to content

Instantly share code, notes, and snippets.

@Andygol
Andygol / overpass.md
Created March 13, 2016 21:49 — forked from planemad/overpass.md
Uploading OSM data to Mapbox using an overpass query

If you have been playing around with the new Mapbox Studio you might be interested to know how to make a custom map with objects of your own interest from OpenStreetMap.

To make the process of creating an updating an OSM based dataset on Mapbox more seamless, I was looking into a command line based workflow that could extract OSM data from Overpass and update a Mapbox hosted dataset in one go.

Requirements

Generate an Overpass Query

  • Use Overpass Turbo to create a query for the data you are interested in extracting. Since i'm interested in bus stops, I first browse the map to Bengaluru, India and then generate a query using the wizard query highway=bus_stop
{
"project": {
"type": "task",
"name": "Turn Lanes",
"description": "Mapping turn lanes from satellite imagery",
"doc_url": "https://github.com/mapbox/mapping/issues/153",
"changeset": {
"comment": "Add missing turn lanes from satellite imagery https://github.com/mapbox/mapping/issues/153",
"source":""
},

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

@Andygol
Andygol / gist:4efb1204d2a6681ccd6b
Last active August 29, 2015 14:17
IT alcohol drink clasification
Classification of the capacity of the container with vodka in IT-style: Классификация емкостей с водкой в стиле IT:
0.1 l. - demo version; 0.1 л. - demo version;
0.25 l. - trial version; 0.25 л. - trial version;
0.5 l. - personal edition; 0.5 л. - personal edition;
0.7 l. - professional edition; 0.7 л. - professional edition;
1.0 l. - network edition; 1.0 л. - network edition;
1.75 l. - enterprise; 1.75 л. - enterprise;
3 l. - for small business; 3 л. - for small business;
5 l. - corporate edition; 5 л. - corporate edition;
@Andygol
Andygol / MapBBCode.user.js
Last active December 30, 2015 12:09
Vizualize map from BBCode [map]...[/map]
// ==UserScript==
// @name MapBBCode visualizer
// @namespace osm
// @version 0.01
// @description Vizualize map from BBCode [map]...[/map]
// ==/UserScript==
(function(){document.body.appendChild(document.createElement('script')).src='http:/'+'/osmz.ru/mapbb.plain.js';})();
@Andygol
Andygol / screencast.sh
Created March 15, 2012 17:02 — forked from pomeo/screencast.sh
script to make screencasts on Linux
#!/bin/bash
# list of programs we depend on
progs="xdpyinfo grep head sed ffmpeg pacat parec sox"
# check for programs we depend on
result=0
for prog in $progs
do
type -p $prog > /dev/null