___an infinite space
45 ways to visualize two numbers http://blog.visual.ly/45-ways-to-communicate-two-quantities/
___navigating the infinite space
knights movement:
| '''Provides utility functions for encoding and decoding linestrings using the | |
| Google encoded polyline algorithm. | |
| ''' | |
| def encode_coords(coords): | |
| '''Encodes a polyline using Google's polyline algorithm | |
| See http://code.google.com/apis/maps/documentation/polylinealgorithm.html | |
| for more information. | |
___an infinite space
45 ways to visualize two numbers http://blog.visual.ly/45-ways-to-communicate-two-quantities/
___navigating the infinite space
knights movement:
| #!/bin/bash | |
| # loop through all of the shapefiles in the directory and act on them | |
| # http://trac.osgeo.org/gdal/wiki/FAQVector#HowcanImergehundredsofShapefiles | |
| # http://stackoverflow.com/questions/965053/extract-filename-and-extension-in-bash | |
| # !IMPORTANT: OGR 1.9 for direct to PostGIS support, linestring-multilinestring, and character encoding support. | |
| if [ $# -ne 1 ]; then | |
| echo "USAGE: ./import.sh <in_dir_path>" |
| # With the GeoJSON OGR driver one can use the CartoDB SQL API to create any OGR supported format output | |
| # OGR Formats: http://gdal.org/ogr/ogr_formats.html | |
| # CartoDB SQL API: http://developers.cartodb.com/documentation/sql-api.html | |
| # This sample creates a DXF making a "select the_geom from meteo" from my account at CartoDB | |
| ogr2ogr -skipfailures -f DXF out.dxf "http://xurxosanz.cartodb.com/api/v2/sql?q=select%20the_geom%20from%20meteo&format=GeoJSON" OGRGeoJSON |
| var express = require('express'); | |
| var oauth = require('oauth'); | |
| var app = express.createServer(); | |
| var key = "[api-key]"; | |
| var secret = "[api-secret]"; | |
| var request = new oauth.OAuth(null, null, key, secret, '1.0', null, 'HMAC-SHA1'); | |
| app.get('/api-request', function(req, res){ | |
| request.get( | |
| "http://127.0.0.1:8000/api/1.0/data.json", |
| /* | |
| * L.TileLayer is used for standard xyz-numbered tile layers. | |
| */ | |
| L.Google = L.Class.extend({ | |
| includes: L.Mixin.Events, | |
| options: { | |
| minZoom: 0, | |
| maxZoom: 18, | |
| tileSize: 256, |
| <html> | |
| <head> | |
| <title>Testing d3.js in Leaflet.js</title> | |
| <link rel="stylesheet" href="leaflet.css" /> | |
| <script type="text/javascript" src="http://d3js.org/d3.v2.min.js?2.9.3"></script> | |
| <script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script> | |
| <style type="text/css"> |
| # cocoa_keypress_monitor.py by Bjarte Johansen is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. | |
| from AppKit import NSApplication, NSApp | |
| from Foundation import NSObject, NSLog | |
| from Cocoa import NSEvent, NSKeyDownMask | |
| from PyObjCTools import AppHelper | |
| class AppDelegate(NSObject): | |
| def applicationDidFinishLaunching_(self, notification): | |
| mask = NSKeyDownMask |
| L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({ | |
| options: { | |
| debug: false | |
| }, | |
| tileSize: 256, | |
| initialize: function (options) { | |
| L.Util.setOptions(this, options); |
| // node.js geo polygon map tile rendering! | |
| // requires https://github.com/learnboost/node-canvas and GeoJSON data files | |
| // e.g. | |
| // data from naturalearthdata.com converted to GeoJSON with GDAL's ogr2ogr | |
| // or from datasf.org, reprojected too: | |
| // ogr2ogr -f GeoJSON sfbay.js sfbay.shp -t_srs EPSG:4326 | |
| var Canvas = require('./vendor/node-canvas/lib/canvas'), | |
| http = require('http'), | |
| fs = require('fs'); |