- Spatial "raw" data is usually in vector form.
- Nodes (sometimes called coordinates or vertices), sometimes connected to form lines, linestrings or polygons.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var secondsToTime = function(s) { | |
var pad = function(v) { | |
return v < 10 ? '0' + v : v.toString(); | |
} | |
var result = ''; | |
for (var i = 0; i < 3; i++) { | |
result = pad(s % 60) + (i ? ':' : '') + result; | |
s = Math.floor(s / 60); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LL="31 70" | |
P0=`echo $LL | cs2cs +proj=longlat +datum=WGS84 +no_defs +to +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs` | |
for I in `seq 1 10`; | |
do | |
P=`echo $LL | cs2cs +proj=longlat +datum=WGS84 +no_defs +to +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs` | |
LL=`echo $P | cs2cs -I +proj=longlat +datum=WGS84 +no_defs +to +proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs` | |
done |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import re | |
from bs4 import BeautifulSoup | |
import urllib2 | |
import csv | |
from datetime import datetime | |
from agithub import Github | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L.Map.addInitHook(function() { | |
var slides = document.querySelector('.slides'), | |
zoom = Number(slides.style.zoom); | |
// Reveal.js sometimes use the zoom CSS property, but sometimes a scale | |
// transform instead. We handle both. | |
if (zoom) { | |
this._container.style.zoom = 1/zoom; | |
} else { | |
zoom = Number(slides.style.transform.replace(/.*scale\(([0-9\.]+)\).*/, '$1')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var L = require('leaflet'); | |
module.exports = L.CircleMarker.extend({ | |
initialize: function(latLng, heading, options) { | |
this._heading = heading; | |
L.CircleMarker.prototype.initialize.call(this, latLng, options); | |
}, | |
setHeading: function(heading) { | |
this._heading = heading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title></title> | |
<style type="text/css"> | |
body { | |
background-color: black; | |
padding: 0; | |
margin: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sys import argv | |
from math import ceil, floor | |
res = float(argv[1]) | |
number_zoom_levels = int(argv[2]) | |
tile_size = int(argv[3]) | |
bbox = [float(v) for v in argv[4].split(',')] | |
total_tiles = 0 | |
for z in xrange(0, number_zoom_levels + 1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GEOMETRYCOLLECTION (LINESTRING (6308869.40378 356821.22669, 6308867.893 356822.41744, 6308852.75314 356830.22159, 6308869.92754 356844.26638), LINESTRING (6308755.07971 356674.51686, 6308784.81355 356719.16757, 6308815.20022 356765.46178, 6308829.63774 356763.22832, 6308852.87023 356759.82402, 6308867.19982 356771.06823, 6308875.40631 356796.20162, 6308872.51907 356815.17242), LINESTRING (6308874.12086 356813.73392, 6308876.83028 356795.77697, 6308868.23871 356770.06254, 6308853.09618 356758.29456, 6308815.86529 356763.89689, 6308799.76731 356739.37835, 6308747.77971 356662.11613, 6308746.55411 356661.61702, 6308744.06545 356657.72563, 6308731.77184 356668.45076, 6308699.45221 356683.15463, 6308682.44689 356684.63193, 6308654.96629 356683.66846, 6308636.13879 356680.0482, 6308618.19888 356671.76352, 6308608.41685 356661.79428, 6308578.7973 356592.35062, 6308545.33908 356542.14886, 6308517.52088 356509.38474, 6308505.40266 356506.84141, 6308493.59689 356506.98067, 6308375.07918 356520.46209), LINESTRING (63088 |