moved to https://github.com/aaronlidman/osm-and-geojson
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
# remove the -v on the last grep to change from blacklist to whitelist | |
wget --spider --force-html -r -l2 http://example.com 2>&1 | grep '^--' | awk '{ print $3 }' | grep -v '\.\(css\|js\|png\|gif\|jpg\)$' > wget.out |
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 | |
mkdir merged; | |
for f in *.shp; | |
do | |
if [ -f merged/merged.shp ] | |
then | |
ogr2ogr -f "ESRI Shapefile" -update -append -skipfailures merged/merged.shp "$f" -nln Merged | |
else | |
ogr2ogr -f "ESRI Shapefile" merged/merged.shp "$f" | |
fi; |
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
http://www2.census.gov/geo/tiger/TIGER2012/AREALM/tl_2012_01_arealm.zip | |
http://www2.census.gov/geo/tiger/TIGER2012/AREALM/tl_2012_02_arealm.zip | |
http://www2.census.gov/geo/tiger/TIGER2012/AREALM/tl_2012_04_arealm.zip | |
http://www2.census.gov/geo/tiger/TIGER2012/AREALM/tl_2012_05_arealm.zip | |
http://www2.census.gov/geo/tiger/TIGER2012/AREALM/tl_2012_06_arealm.zip | |
http://www2.census.gov/geo/tiger/TIGER2012/AREALM/tl_2012_08_arealm.zip | |
http://www2.census.gov/geo/tiger/TIGER2012/AREALM/tl_2012_09_arealm.zip | |
http://www2.census.gov/geo/tiger/TIGER2012/AREALM/tl_2012_10_arealm.zip | |
http://www2.census.gov/geo/tiger/TIGER2012/AREALM/tl_2012_11_arealm.zip | |
http://www2.census.gov/geo/tiger/TIGER2012/AREALM/tl_2012_12_arealm.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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.css" /> | |
<!--[if lte IE 8]> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.ie.css" /> | |
<![endif]--> | |
<script src="http://cdn.leafletjs.com/leaflet-0.4/leaflet.js"></script> | |
<style type="text/css"> |
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
<osmChange version="0.6"> | |
<create> | |
<node id="-1" lat="43.5885936986" lon="-93.8280111551" timestamp="2012-11-29T23:31:27Z" /> | |
<node id="-2" lat="43.5879681303" lon="-93.8280540705" timestamp="2012-11-29T23:31:27Z" /> | |
<node id="-3" lat="43.587618431" lon="-93.831063509" timestamp="2012-11-29T23:31:27Z" /> | |
<node id="-4" lat="43.5883527973" lon="-93.8312137127" timestamp="2012-11-29T23:31:27Z" /> | |
<way id="-5" timestamp="2012-11-29T23:31:27Z"> | |
<nd ref="-1" /> | |
<nd ref="-2" /> | |
<nd ref="-3" /> |
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
<table> | |
<tr> | |
<th>MTFCC</th> | |
<th>description</th> | |
<th>count</th> | |
<th>total area (sq mi)</th> | |
</tr> | |
<tr> | |
<td>C3023</td> | |
<td>Island</td> |
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> | |
<body> | |
<canvas id="demo" height="640" width="640" style="background-color: white;"></div> | |
</body> | |
<script type="text/javascript"> | |
var canvas = document.getElementById('demo'); | |
var context = canvas.getContext('2d'); | |
var start = new Date(); | |
var lines = 12, | |
cW = context.canvas.width, |
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
ogr2ogr -f "SQLite" -t_srs EPSG:4326 merged.sqlite Parks/parks.shp | |
# the resulting main sqlite table is named after the original shapefile, in this case 'parks' |
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
import csv | |
count = 0 | |
places = {} | |
with open('infobox_properties_en.nt', 'rU') as file: | |
r = csv.reader(file, delimiter=' ') | |
for line in r: | |
# line 1 is just a timestamp | |
if count > 0 and count < 200: |