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
( | |
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 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 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 '%-%' | |
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
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 |
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> | |
<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 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 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 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
#placenames-medium { | |
[capital = 'yes'] { | |
[zoom >= 5][zoom < 15] { | |
text-name: "[name]"; | |
text-size: 10; | |
text-fill: @placenames; | |
text-face-name: @book-fonts; | |
text-halo-radius: 1.5; | |
text-min-distance: 10; | |
[zoom >= 6] { |