Skip to content

Instantly share code, notes, and snippets.

{
"alwaysShowComment": false,
"preview": false,
"params": {
"matching": "PATTERN",
"stopAfterFirstMatch": false,
"appliesTo": "COLUMNS",
"normalization": "EXACT",
"columns": [
"DIR,C,60",
@mvanlaar
mvanlaar / Bogota Eldorado Map.json
Created January 31, 2017 14:18
Bogota Eldorado Map
[{ "id": "55de8b712ba7b30d8c8347df", "type": "Feature", "geometry": {  "coordinates": [-74.139182036742568,  4.6984080965964763],  "type": "Point" }, "properties": {  "name": "Gate 43",  "aliases": [],  "categories": {   "maiN_TERMINAL": "Terminal 1"  },  "floor": "2",  "floorName": "2",  "building": "1",  "venue": "BOG",  "type": "Gate" }},{ "id": "55de8b1c2ba7b30d8c8347de", "type": "Feature", "geometry": {  "coordinates": [-74.139589732512832,  4.6987449191970789],  "type": "Point" }, "properties": {  "name": "Gate 40 - 41 - 42",  "aliases": ["Gate 40",  "Gate 41",  "Gate 42"],  "categories": {   "maiN_TERMINAL": "Terminal 1"  },  "floor": "2",  "floorName": "2",  "building": "1",  "venue": "BOG",  "type": "Gate" }},{ "id": "55de8bfa2ba7b30d8c8347e0", "type": "Feature", "geometry": {  "coordinates": [-74.138758247718215,  4.6981060253956013],  "type": "Point" }, "properties": {  "name": "Gate 44 - 45 - 46",  "aliases": ["Gate 44",  "Gate 45",  "Gate 46"],  "categories": {   "maiN_TERMINAL": "Terminal 1"  },
@mvanlaar
mvanlaar / Program.cs
Created December 23, 2016 13:19
Ada-Aero Parser
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using HtmlAgilityPack;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Web;
@mvanlaar
mvanlaar / osm-relation2points.php
Created June 24, 2016 18:20 — forked from reinvented/osm-relation2points.php
Quick hack to take an OpenStreetMap bus route relation and convert it to an ordered series of points (suitable for use in a GTFS feed)
<?php
// This is the ID of the bus route relation.
$relation = '5838068';
// Retrieve the OSM for the object (which is XML of the relation and all of its children)
$xml = simplexml_load_file("http://www.openstreetmap.org/api/0.6/relation/$relation/full");
// First, we'll get all the ways that make up the "route" relation (assuming here there's only one!)
$relation_ways = array();
@mvanlaar
mvanlaar / gist:8f6788b434c4db851410
Last active August 29, 2015 14:24
Config NTP on ubuntu 14.04
date
sudo apt-get install ntp
sudo nano /etc/ntp.conf
change:
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org
@mvanlaar
mvanlaar / Install gtfs editor ubuntu 14.04.sh
Last active November 30, 2015 21:36
Install gtfs editor ubuntu 14.04
sudo apt-get install openjdk-7-jre
sudo apt-get install git
sudo apt-get install unzip
wget http://downloads.typesafe.com/releases/play-1.2.5.zip
unzip play-1.2.5.zip
sudo mv play-1.2.5 /usr/local/
sudo ln -s /usr/local/play-1.2.5/ /usr/local/play
sudo ln -s /usr/local/play/play /usr/local/bin/play
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt trusty-pgdg main" >> /etc/apt/sources.list'
This guide documents the steps I used to get OSM Bright successfully loaded in TileMill v.0.10.1 on Windows 7 Enterprise SP1
Required software:
Python (2.7 for me)
TileMill v.0.10.1 ( https://www.mapbox.com/tilemill/ )
OpenGeo Suite 4.0.1 (uses PostgreSQL 9.3rc1). OpenGeo suite isn't a hard requirement here. There are other ways to install postgres/PostGIS. This just seemed like the quickest and easiest way to get up and running. I installed to the default location and also installed Client Tools for PostGIS, pgAdmin and GDAL though these are likely not prerequisites. ( http://boundlessgeo.com/solutions/opengeo-suite/download/ ) Note: Name and e-mail registration is required to download.