Author: Sean Gillies Version: 1.0
This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.
from xml.sax.handler import ContentHandler | |
import os | |
import codecs | |
from xml.sax.saxutils import escape | |
class OSMHandler(ContentHandler): | |
"""This is a base OSMHandler class which sets up the XML parsing, etc. | |
You will want to override the selectElement and transformElement | |
functions""" |
from sys import argv | |
from shapely.ops import polygonize | |
from shapely.geometry import asShape, LineString | |
import json | |
if __name__ == '__main__': | |
input = argv[1] | |
input = json.load(open(input)) |
#!/usr/bin/env node | |
/* | |
* Parsing BIG compressed data with Node.js and SAX | |
* Probably some bugs, but worked fine for OpenStreetMap Great Britain bz2 | |
* Greg Miell 2012 | |
*/ | |
// Simple string trim prototype extension | |
String.prototype.trim = function() { |
#!/usr/bin/python | |
# README | |
# | |
# This script is from: https://gist.github.com/1953554 | |
# By Nathaniel Vaughn Kelso and Mike Migurski @ Stamen | |
# | |
# Based on script by andrewharvey: https://gist.github.com/1675606 | |
# | |
# This script should be considered CC0 licensed |
Dear soon-to-be-former user, | |
We've got some fantastic news! Well, it's great news for us anyway. You, on | |
the other hand, are fucked. | |
We've just been acquired by: | |
/* | |
* L.TileLayer.LocalCache : A tile layer using SQL Storage, if available. | |
*/ | |
L.TileLayer.LocalCache = L.TileLayer.extend({ | |
options: { | |
minZoom: 0, | |
maxZoom: 18, | |
tileSize: 256, | |
subdomains: 'abc', |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Simple script to create geojson from osm files. | |
Prints geojson features line by line. | |
Currently we don't support relations. | |
Requires (unmodified) imposm and imposm.parser | |
Inspired by https://github.com/emka/OSMCouch | |
''' |
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
/* | |
You can now create a spinner using any of the variants below: | |
$("#el").spin(); // Produces default Spinner using the text color of #el. | |
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el. | |
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color). | |
$("#el").spin({ ... }); // Produces a Spinner using your custom settings. | |
$("#el").spin(false); // Kills the spinner. |