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 | |
# 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 |
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
// replace "toner" here with "terrain" or "watercolor" | |
var layer = new MM.StamenTileLayer("toner"); | |
var map = new MM.Map("element_id", layer); | |
map.setCenterZoom(new MM.Location(37.7, -122.4), 12); |
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
// replace "toner" here with "terrain" or "watercolor" | |
var layer = new L.StamenTileLayer("toner"); | |
var map = new L.Map("element_id", { | |
center: new L.LatLng(37.7, -122.4), | |
zoom: 12 | |
}); | |
map.addLayer(layer); |
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
// replace "toner" here with "terrain" or "watercolor" | |
var layer = new OpenLayers.Layer.Stamen("toner"); | |
var map = new OpenLayers.Map("element_id"); | |
map.addLayer(layer); |
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
// replace "toner" here with "terrain" or "watercolor" | |
var layer = "toner"; | |
var map = new google.maps.Map(document.getElementById("element_id"), { | |
center: new google.maps.LatLng(37.7, -122.4), | |
zoom: 12, | |
mapTypeId: layer, | |
mapTypeControlOptions: { | |
mapTypeIds: [layer] | |
} | |
}); |
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
/* | |
Turns red dots on the Field Papers tiles into markers automatically | |
Write a description to save the marker | |
I don't understand the server-side installation or the QR-scanning, so I'm using a bookmarklet | |
Client-side HTML5 Canvas for tile inspection | |
*/ | |
// collect the most zoomed-in tiles from the scan | |
var zoomimgs = document.getElementsByTagName("img"); | |
var maxzoom = 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
legend: #PctHomesInNegEquityOfMortgage | |
<span style="color: #e73a43">▉</span> 0.4 – 1.0 <br /> | |
<span style="color: #ff7265">▉</span> 0.3 – 0.4 <br /> | |
<span style="color: #ffac8f">▉</span> 0.2 – 0.3 <br /> | |
<span style="color: #ffd8b0">▉</span> 0.1 – 0.2 <br /> | |
<span style="color: #fff4e5">▉</span> 0.0 – 0.1 <br /> | |
<span style="color: #cad8e5">▉</span> No data |
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/env python | |
# distance_from_shore.py: compute true distance between points | |
# and closest geometry. | |
# shaun walbridge, 2012.05.15 | |
# TODO: no indexing used currently, could stand if performance needs | |
# improving (currently runs in ~1.5hr for 13k points) | |
from geopy import distance |
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
UTF-8 + spherical mercator. | |
http://cascadenik.teczno.com/data/ne-1.4/900913/admin_0_boundary_breakaway_disputed_areas_10m.zip | |
http://cascadenik.teczno.com/data/ne-1.4/900913/admin_0_boundary_breakaway_disputed_areas_50m.zip | |
http://cascadenik.teczno.com/data/ne-1.4/900913/admin_0_boundary_lines_land_10m.zip | |
http://cascadenik.teczno.com/data/ne-1.4/900913/admin_0_boundary_lines_land_50m.zip | |
http://cascadenik.teczno.com/data/ne-1.4/900913/admin_0_boundary_lines_land_110m.zip | |
http://cascadenik.teczno.com/data/ne-1.4/900913/admin_0_boundary_lines_map_units_10m.zip | |
http://cascadenik.teczno.com/data/ne-1.4/900913/admin_0_boundary_lines_maritime_indicator_10m.zip | |
http://cascadenik.teczno.com/data/ne-1.4/900913/admin_0_boundary_lines_maritime_indicator_50m.zip |
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
zips/packages/natural_earth_vector.sqlite.zip: | |
#SQL-Lite | |
for shp in 10m_cultural/*.shp 10m_physical/*.shp 50m_cultural/*.shp 50m_physical/*.shp 110m_cultural/*.shp 110m_physical/*.shp; \ | |
do \ | |
ogr2ogr -f SQLite -append zips/packages/natural_earth_vector.sqlite $$shp; \ | |
done | |
zip zips/packages/natural_earth_vector.sqlite.zip zips/packages/natural_earth_vector.sqlite VERSION README.md CHANGELOG |
OlderNewer