This file contains hidden or 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> | |
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></script> | |
<link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } | |
#map { position:absolute; top:0; bottom:0; width:100%; } | |
</style> | |
</head> |
This file contains hidden or 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> | |
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></script> | |
<link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } | |
#map { position:absolute; top:0; bottom:0; width:100%; } | |
</style> | |
</head> |
This file contains hidden or 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
sudo -i | |
cat > /etc/apt/sources.list.d/pgdg.list <<EOF | |
deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main | |
#deb-src http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main | |
EOF | |
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - | |
apt-get update | |
apt-get --no-install-recommends install -y postgresql-9.3-postgis-2.1 postgresql-contrib-9.3 proj-bin |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
SELECT r.id as rid, w.id as wid, r.tags->'ref' as rref, w.tags->'ref' as wref | |
FROM relations r JOIN relation_members rm on (r.id=rm.relation_id) JOIN ways w on (rm.member_id = w.id and rm.member_type='W') | |
WHERE r.tags@>hstore('type','route') | |
AND r.tags@>hstore('route','road') | |
AND r.tags?'ref' | |
AND (r.tags->'ref') LIKE '%-%' | |
AND w.tags?'ref' | |
AND w.tags?'highway' | |
AND NOT (w.tags->'ref') LIKE '%-%' | |
This file contains hidden or 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
# Copy images into suitable named directory indicating date and trip | |
export GEM_HOME=/home/pnorman/osm/gpx2exif | |
# Sharpen and fix colours | |
mogrify -unsharp 8x1.7 -normalize *-*/IMG_*.JPG | |
# Adjust times. Reverse sign from JOSM. My camera drifts so that I need a positive time in JOSM, so this tends to be -= for me. | |
exiftool "-DateTimeOriginal-=0:0:2" "-CreateDate-=0:0:2" *-*/*.JPG | |
# Geotag |
This file contains hidden or 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
( | |
SELECT | |
w.way, string_agg(COALESCE(r.ref, w.ref),';') AS ref, | |
w.highway, char_length(string_agg(COALESCE(r.ref, w.ref),';')) AS length | |
FROM ( | |
SELECT | |
ctid, way, highway, ref | |
FROM planet_osm_roads r | |
WHERE r.highway in ('motorway','trunk','primary','secondary') | |
AND r.way && !bbox!) AS w |
This file contains hidden or 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
SELECT | |
w1.id AS link_id | |
FROM ways w1 | |
JOIN nodes n ON (w1.nodes[1] = n.id) | |
JOIN ( | |
SELECT wn.node_id, wn.way_id, tags, nodes FROM way_nodes wn JOIN ways w ON (wn.way_id = w.id) | |
WHERE w.tags @> hstore('highway','motorway') | |
) AS wn1 ON (wn1.node_id = n.id) | |
LEFT JOIN ( | |
SELECT wn.node_id, wn.way_id, tags, nodes FROM way_nodes wn JOIN ways w ON (wn.way_id = w.id) |
This file contains hidden or 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
gpart create -s GPT da8 | |
gpart create -s GPT da9 | |
gpart add -s 222 -a 4k -t freebsd-boot -l boot0 da8 | |
gpart add -a 4k -t freebsd-zfs -l disk0 -s 650GB da8 | |
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da8 | |
gpart add -s 222 -a 4k -t freebsd-boot -l boot1 da9 | |
gpart add -a 4k -t freebsd-zfs -l disk1 -s 650GB da9 | |
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da9 |