diff --git a/Makefile b/Makefile
index 4e09f30cc..f707d69b5 100644
--- a/Makefile
+++ b/Makefile
@@ -84,6 +84,9 @@ clean:
translations:
node data/update_locales
+imagery:
+ node data/update_imagery
+
SPRITE = inkscape --export-area-page
dist/img/line-presets.png: svg/line-presets.svg
diff --git a/data/imagery.json b/data/imagery.json
index 2c09535c8..b8b4264fd 100644
--- a/data/imagery.json
+++ b/data/imagery.json
@@ -1,574 +1,1008 @@
[
{
- "name": "Bing aerial imagery",
- "template": "http://ecn.t{t}.tiles.virtualearth.net/tiles/a{u}.jpeg?g=587&mkt=en-gb&n=z",
- "description": "Satellite imagery.",
- "scaleExtent": [
- 0,
- 20
- ],
- "subdomains": [
- "0",
- "1",
- "2",
- "3"
- ],
- "default": true,
- "sourcetag": "Bing",
- "logo": "bing_maps.png",
- "logo_url": "http://www.bing.com/maps",
- "terms_url": "http://opengeodata.org/microsoft-imagery-details"
- },
- {
- "name": "Locator Overlay",
- "template": "http://{t}.tiles.mapbox.com/v3/openstreetmap.map-btyhiati/{z}/{x}/{y}.png",
- "description": "Shows major features to help orient you.",
- "overlay": true,
- "default": true,
- "scaleExtent": [
- 0,
- 16
- ],
- "subdomains": [
- "a",
- "b",
- "c"
- ],
- "terms_url": "http://mapbox.com/tos/"
- },
- {
- "name": "MapBox Satellite",
- "template": "http://{t}.tiles.mapbox.com/v3/openstreetmap.map-4wvf9l0l/{z}/{x}/{y}.png",
- "description": "Satellite and aerial imagery.",
- "scaleExtent": [
- 0,
- 16
- ],
- "subdomains": [
- "a",
- "b",
- "c"
- ],
- "terms_url": "http://mapbox.com/tos/"
- },
- {
- "name": "OpenStreetMap",
- "template": "http://{t}.tile.openstreetmap.org/{z}/{x}/{y}.png",
- "description": "The default OpenStreetMap layer.",
- "scaleExtent": [
- 0,
- 18
- ],
- "subdomains": [
- "a",
- "b",
- "c"
+ "name": "7th Series (OS7)",
+ "type": "tms",
+ "template": "http://ooc.openstreetmap.org/os7/{zoom}/{x}/{y}.jpg",
+ "extents": [
+ [
+ [
+ -9,
+ 49.8
+ ],
+ [
+ 1.9,
+ 61.1
+ ]
+ ]
]
},
{
- "name": "TIGER 2012 Roads Overlay",
- "template": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png",
- "sourcetag": "TIGER 2012",
- "overlay": true,
+ "name": "AGRI black-and-white 2.5m",
+ "type": "tms",
+ "template": "http://agri.openstreetmap.org/{zoom}/{x}/{y}.png",
+ "extents": [
+ [
+ [
+ 112.28778,
+ -44.062107
+ ],
+ [
+ 156.62761,
+ -9.992408
+ ]
+ ]
+ ],
+ "terms_text": "AGRI"
+ },
+ {
+ "name": "Bing aerial imagery",
+ "type": "bing",
+ "description": "Satellite and aerial imagery.",
+ "template": "http://www.bing.com/maps/",
"scaleExtent": [
- 16,
+ 0,
+ 22
+ ],
+ "id": "Bing",
+ "default": true
+ },
+ {
+ "name": "British Columbia Mosaic",
+ "type": "tms",
+ "template": "http://{switch:a,b,c,d}.imagery.paulnorman.ca/tiles/bc_mosaic/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 9,
+ 20
+ ],
+ "extents": [
+ [
+ [
+ -123.440717,
+ 48.9954007
+ ],
+ [
+ -121.3462885,
+ 50.4256959
+ ]
+ ]
+ ],
+ "terms_url": "http://imagery.paulnorman.ca/tiles/about.html",
+ "terms_text": "Copyright Province of British Columbia, City of Surrey"
+ },
+ {
+ "name": "Cambodia, Laos, Thailand, Vietnam bilingual",
+ "type": "tms",
+ "template": "http://{switch:a,b,c,d}.tile.osm-tools.org/osm_then/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 0,
19
],
- "subdomains": [
- "a",
- "b",
- "c"
+ "extents": [
+ [
+ [
+ 97.3,
+ 5.6
+ ],
+ [
+ 109.6,
+ 23.4
+ ]
+ ]
],
- "extents": [[
- [
- -124.81,
- 24.055
- ],
- [
- -66.865,
- 49.386
- ]
- ],[
- [
- -179.754,
- 50.858
- ],
- [
- -129.899,
- 71.463
- ]
- ],[
- [
- -174.46,
- 18.702
- ],
- [
- -154.516,
- 26.501
- ]
- ]]
+ "terms_url": "http://www.osm-tools.org/",
+ "terms_text": "© osm-tools.org & OpenStreetMap contributors, CC-BY-SA"
},
{
- "name": "USGS Topographic Maps",
- "template": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png",
- "subdomains": [
- "a",
- "b",
- "c"
+ "name": "Freemap.sk Car",
+ "type": "tms",
+ "template": "http://t{switch:1,2,3,4}.freemap.sk/A/{zoom}/{x}/{y}.jpeg",
+ "scaleExtent": [
+ 8,
+ 16
],
- "extents": [[
+ "extents": [
[
- -125.991,
- 24.005
- ],
- [
- -65.988,
- 50.009
+ [
+ 16.7988747,
+ 47.7145247
+ ],
+ [
+ 22.5884098,
+ 49.6375827
+ ]
]
- ],[
- [
- -160.579,
- 18.902
- ],
- [
- -154.793,
- 22.508
- ]
- ],[
- [
- -178.001,
- 51.255
- ],
- [
- -130.004,
- 71.999
- ]
- ]]
- },
- {
- "name": "USGS Large Scale Aerial Imagery",
- "template": "http://{t}.tile.openstreetmap.us/usgs_large_scale/{z}/{x}/{y}.jpg",
- "subdomains": [
- "a",
- "b",
- "c"
],
- "extents": [[
- [
- -124.819,
- 24.496
- ],
- [
- -66.931,
- 49.443
- ]
- ]]
+ "terms_text": "Copyright ©2007-2012 Freemap Slovakia (www.freemap.sk). Some rights reserved."
},
{
- "name": "British Columbia bc_mosaic",
- "template": "http://{t}.imagery.paulnorman.ca/tiles/bc_mosaic/{z}/{x}/{y}.png",
- "subdomains": [
- "a",
- "b",
- "c",
- "d"
+ "name": "Freemap.sk Cyclo",
+ "type": "tms",
+ "template": "http://t{switch:1,2,3,4}.freemap.sk/C/{zoom}/{x}/{y}.jpeg",
+ "scaleExtent": [
+ 8,
+ 16
],
- "extents": [[
+ "extents": [
[
- -123.441,
- 48.995
- ],
- [
- -121.346,
- 50.426
+ [
+ 16.7988747,
+ 47.7145247
+ ],
+ [
+ 22.5884098,
+ 49.6375827
+ ]
]
- ]],
- "sourcetag": "bc_mosaic",
- "terms_url": "http://imagery.paulnorman.ca/tiles/about.html"
- },
- {
- "name": "OS OpenData Streetview",
- "template": "http://os.openstreetmap.org/sv/{z}/{x}/{y}.png",
- "extents": [[
- [
- -8.72,
- 49.86
- ],
- [
- 1.84,
- 60.92
- ]
- ]],
- "sourcetag": "OS_OpenData_StreetView"
- },
- {
- "name": "OS OpenData Locator",
- "template": "http://tiles.itoworld.com/os_locator/{z}/{x}/{y}.png",
- "extents": [[
- [
- -9,
- 49.8
- ],
- [
- 1.9,
- 61.1
- ]
- ]],
- "sourcetag": "OS_OpenData_Locator"
- },
- {
- "name": "OS 1:25k historic (OSM)",
- "template": "http://ooc.openstreetmap.org/os1/{z}/{x}/{y}.jpg",
- "extents": [[
- [
- -9,
- 49.8
- ],
- [
- 1.9,
- 61.1
- ]
- ]],
- "sourcetag": "OS 1:25k"
- },
- {
- "name": "OS 1:25k historic (NLS)",
- "template": "http://geo.nls.uk/mapdata2/os/25000/{z}/{x}/{y}.png",
- "extents": [[
- [
- -9,
- 49.8
- ],
- [
- 1.9,
- 61.1
- ]
- ]],
- "sourcetag": "OS 1:25k",
- "logo": "icons/logo_nls70-nq8.png",
- "logo_url": "http://geo.nls.uk/maps/"
- },
- {
- "name": "OS 7th Series historic (OSM)",
- "template": "http://ooc.openstreetmap.org/os7/{z}/{x}/{y}.jpg",
- "extents": [[
- [
- -9,
- 49.8
- ],
- [
- 1.9,
- 61.1
- ]
- ]],
- "sourcetag": "OS7"
- },
- {
- "name": "OS 7th Series historic (NLS)",
- "template": "http://geo.nls.uk/mapdata2/os/seventh/{z}/{x}/{y}.png",
- "extents": [[
- [
- -9,
- 49.8
- ],
- [
- 1.9,
- 61.1
- ]
- ]],
- "sourcetag": "OS7",
- "logo": "icons/logo_nls70-nq8.png",
- "logo_url": "http://geo.nls.uk/maps/"
- },
- {
- "name": "OS New Popular Edition historic",
- "template": "http://ooc.openstreetmap.org/npe/{z}/{x}/{y}.png",
- "extents": [[
- [
- -5.8,
- 49.8
- ],
- [
- 1.9,
- 55.8
- ]
- ]],
- "sourcetag": "NPE"
- },
- {
- "name": "OS Scottish Popular historic",
- "template": "http://ooc.openstreetmap.org/npescotland/tiles/{z}/{x}/{y}.jpg",
- "extents": [[
- [
- -7.8,
- 54.5
- ],
- [
- -1.1,
- 61.1
- ]
- ]],
- "sourcetag": "NPE"
- },
- {
- "name": "Surrey aerial",
- "template": "http://gravitystorm.dev.openstreetmap.org/surrey/{z}/{x}/{y}.png",
- "extents": [[
- [
- -0.856,
- 51.071
- ],
- [
- 0.062,
- 51.473
- ]
- ]],
- "sourcetag": "Surrey aerial"
- },
- {
- "name": "Port au Prince - GeoEye Jan 2010",
- "template": "http://gravitystorm.dev.openstreetmap.org/imagery/haiti/{z}/{x}/{y}.png",
- "extents": [[
- [
- -72.43,
- 18.50
- ],
- [
- -72.31,
- 18.58
- ]
- ]],
- "sourcetag": "GeoEye, 2010-01"
- },
- {
- "name": "Haiti - IOM Drone Imagery, 2012-13",
- "template": "http://wms.openstreetmap.fr/tms/1.0.0/iomhaiti/{zoom}/{x}/{y}",
- "extents": [[
- [
- -74.5,
- 17.95
- ],
- [
- -71.58,
- 20.12
- ]
- ]],
- "sourcetag": "iom_image2013"
- },
- {
- "name": "NAIP",
- "template": "http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/{z}/{x}/{y}.png",
- "description": "National Agriculture Imagery Program",
- "extents": [[
- [
- -125.8,
- 24.2
- ],
- [
- -62.3,
- 49.5
- ]
- ],[
- [
- -168.5,
- 55.3
- ],
- [
- -140,
- 71.5
- ]
- ]],
- "sourcetag": "NAIP"
- },
- {
- "name": "Ireland - NLS Historic Maps",
- "template": "http://geo.nls.uk/maps/ireland/gsgs4136/{z}/{x}/{y}.png",
- "extents": [[
- [
- -10.71,
- 51.32
- ],
- [
- -5.37,
- 55.46
- ]
- ]],
- "sourcetag": "NLS Historic Maps",
- "logo": "icons/logo_nls70-nq8.png",
- "logo_url": "http://geo.nls.uk/maps/"
- },
- {
- "name": "Denmark - Fugro Aerial Imagery",
- "template": "http://tile.openstreetmap.dk/fugro2005/{z}/{x}/{y}.jpg",
- "extents": [[
- [
- 7.81,
- 54.44
- ],
- [
- 15.49,
- 57.86
- ]
- ]],
- "sourcetag": "Fugro (2005)"
- },
- {
- "name": "Denmark - Stevns Kommune",
- "template": "http://tile.openstreetmap.dk/stevns/2009/{z}/{x}/{y}.jpg",
- "extents": [[
- [
- 12.09144,
- 55.23403
- ],
- [
- 12.47712,
- 55.43647
- ]
- ]],
- "sourcetag": "Stevns Kommune (2009)"
- },
- {
- "name": "Austria - geoimage.at",
- "template": "http://geoimage.openstreetmap.at/4d80de696cd562a63ce463a58a61488d/{z}/{x}/{y}.jpg",
- "extents": [[
- [
- 9.36,
- 46.33
- ],
- [
- 17.28,
- 49.09
- ]
- ]],
- "sourcetag": "geoimage.at"
- },
- {
- "name": "Russia - Kosmosnimki.ru IRS Satellite",
- "template": "http://irs.gis-lab.info/?layers=irs&request=GetTile&z={z}&x={x}&y={y}",
- "extents": [[
- [
- 19.02,
- 40.96
- ],
- [
- 77.34,
- 70.48
- ]
- ]],
- "sourcetag": "Kosmosnimki.ru IRS"
- },
- {
- "name": "Belarus - Kosmosnimki.ru SPOT4 Satellite",
- "template": "http://irs.gis-lab.info/?layers=spot&request=GetTile&z={z}&x={x}&y={y}",
- "extents": [[
- [
- 23.16,
- 51.25
- ],
- [
- 32.83,
- 56.19
- ]
- ]],
- "sourcetag": "Kosmosnimki.ru SPOT4"
- },
- {
- "name": "Australia - Geographic Reference Image",
- "template": "http://agri.openstreetmap.org/{z}/{x}/{y}.png",
- "extents": [[
- [
- 96,
- -44
- ],
- [
- 168,
- -9
- ]
- ]],
- "sourcetag": "AGRI"
- },
- {
- "name": "Switzerland - Canton Aargau - AGIS 25cm 2011",
- "template": "http://tiles.poole.ch/AGIS/OF2011/{z}/{x}/{y}.png",
- "extents": [[
- [
- 7.69,
- 47.13
- ],
- [
- 8.48,
- 47.63
- ]
- ]],
- "sourcetag": "AGIS OF2011"
- },
- {
- "name": "Switzerland - Canton Solothurn - SOGIS 2007",
- "template": "http://mapproxy.sosm.ch:8080/tiles/sogis2007/EPSG900913/{z}/{x}/{y}.png?origin=nw",
- "extents": [[
- [
- 7.33,
- 47.06
- ],
- [
- 8.04,
- 47.5
- ]
- ]],
- "sourcetag": "Orthofoto 2007 WMS Solothurn"
- },
- {
- "name": "Poland - Media-Lab fleet GPS masstracks",
- "template": "http://masstracks.media-lab.com.pl/{z}/{x}/{y}.png",
- "extents": [[
- [
- 14,
- 48.9
- ],
- [
- 24.2,
- 55
- ]
- ]],
- "sourcetag": "masstracks"
- },
- {
- "name": "South Africa - CD:NGI Aerial",
- "template": "http://{t}.aerial.openstreetmap.org.za/ngi-aerial/{z}/{x}/{y}.jpg",
- "subdomains": [
- "a",
- "b",
- "c"
],
- "extents": [[
+ "terms_text": "Copyright ©2007-2012 Freemap Slovakia (www.freemap.sk). Some rights reserved."
+ },
+ {
+ "name": "Freemap.sk Hiking",
+ "type": "tms",
+ "template": "http://t{switch:1,2,3,4}.freemap.sk/T/{zoom}/{x}/{y}.jpeg",
+ "scaleExtent": [
+ 8,
+ 16
+ ],
+ "extents": [
[
- 17.64,
- -34.95
- ],
- [
- 32.87,
- -22.05
+ [
+ 16.7988747,
+ 47.7145247
+ ],
+ [
+ 22.5884098,
+ 49.6375827
+ ]
]
- ]],
- "sourcetag": "ngi-aerial"
+ ],
+ "terms_text": "Copyright ©2007-2012 Freemap Slovakia (www.freemap.sk). Some rights reserved."
+ },
+ {
+ "name": "Freemap.sk Ski",
+ "type": "tms",
+ "template": "http://t{switch:1,2,3,4}.freemap.sk/K/{zoom}/{x}/{y}.jpeg",
+ "scaleExtent": [
+ 8,
+ 16
+ ],
+ "extents": [
+ [
+ [
+ 16.7988747,
+ 47.7145247
+ ],
+ [
+ 22.5884098,
+ 49.6375827
+ ]
+ ]
+ ],
+ "terms_text": "Copyright ©2007-2012 Freemap Slovakia (www.freemap.sk). Some rights reserved."
+ },
+ {
+ "name": "Fugro (Denmark)",
+ "type": "tms",
+ "template": "http://{switch:a,b,c}.tile.openstreetmap.dk/fugro2005/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 0,
+ 19
+ ],
+ "extents": [
+ [
+ [
+ 8.0185123,
+ 54.4681655
+ ],
+ [
+ 15.309925,
+ 57.8228945
+ ]
+ ]
+ ],
+ "terms_url": "http://wiki.openstreetmap.org/wiki/Fugro",
+ "terms_text": "Fugro Aerial Mapping"
+ },
+ {
+ "name": "Ireland Bartholomew Quarter-Inch 1940",
+ "type": "tms",
+ "template": "http://geo.nls.uk/maps/ireland/bartholomew/{zoom}/{x}/{-y}.png",
+ "scaleExtent": [
+ 5,
+ 13
+ ],
+ "extents": [
+ [
+ [
+ -10.6702376,
+ 51.3091083
+ ],
+ [
+ -5.3614762,
+ 55.4530757
+ ]
+ ]
+ ],
+ "terms_url": "http://geo.nls.uk/maps/",
+ "terms_text": "National Library of Scotland Historic Maps"
+ },
+ {
+ "name": "Ireland British War Office One-Inch 1941-43 GSGS 4136",
+ "type": "tms",
+ "template": "http://geo.nls.uk/maps/ireland/gsgs4136/{zoom}/{x}/{-y}.png",
+ "scaleExtent": [
+ 5,
+ 15
+ ],
+ "extents": [
+ [
+ [
+ -10.5005905,
+ 51.4147902
+ ],
+ [
+ -5.3618278,
+ 55.3874955
+ ]
+ ]
+ ],
+ "terms_url": "http://geo.nls.uk/maps/",
+ "terms_text": "National Library of Scotland Historic Maps"
+ },
+ {
+ "name": "Ireland EEA CORINE 2006",
+ "type": "tms",
+ "template": "http://a.tile.openstreetmap.ie/tiles/corine/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 5,
+ 16
+ ],
+ "extents": [
+ [
+ [
+ -11.035318,
+ 51.1991221
+ ],
+ [
+ -5.0649187,
+ 55.6205288
+ ]
+ ]
+ ],
+ "terms_url": "http://www.eea.europa.eu/data-and-maps/data/clc-2006-vector-data-version-1",
+ "terms_text": "EEA Corine 2006"
+ },
+ {
+ "name": "Ireland EEA GMES Urban Atlas",
+ "type": "tms",
+ "template": "http://a.tile.openstreetmap.ie/tiles/urbanatlas/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 5,
+ 17
+ ],
+ "extents": [
+ [
+ [
+ -10.71,
+ 51.32
+ ],
+ [
+ -5.37,
+ 55.46
+ ]
+ ]
+ ],
+ "terms_url": "http://www.eea.europa.eu/data-and-maps/data/urban-atlas",
+ "terms_text": "EEA GMES Urban Atlas"
+ },
+ {
+ "name": "Kanton Aargau 25cm (AGIS 2011)",
+ "type": "tms",
+ "template": "http://tiles.poole.ch/AGIS/OF2011/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 14,
+ 19
+ ],
+ "extents": [
+ [
+ [
+ 7.7,
+ 47.12
+ ],
+ [
+ 8.5,
+ 47.63
+ ]
+ ]
+ ],
+ "terms_text": "AGIS OF2011"
+ },
+ {
+ "name": "Katastrálna mapa Slovenska (KaPor, 2010-04)",
+ "type": "tms",
+ "template": "http://www.freemap.sk/tms/kapor2/{zoom}/{x}/{y}.jpg",
+ "extents": [
+ [
+ [
+ 16.7988747,
+ 47.7145247
+ ],
+ [
+ 22.5884098,
+ 49.6375827
+ ]
+ ]
+ ],
+ "terms_url": "http://wiki.freemap.sk/KatasterPortal",
+ "terms_text": "Permisssion by UGKK"
+ },
+ {
+ "name": "Katastrálna mapa Slovenska (KaPor, 2011-05)",
+ "type": "tms",
+ "template": "http://www.freemap.sk/tms/kapor2_201105/{zoom}/{x}/{y}.jpg",
+ "extents": [
+ [
+ [
+ 16.7988747,
+ 47.7145247
+ ],
+ [
+ 22.5884098,
+ 49.6375827
+ ]
+ ]
+ ],
+ "terms_url": "http://wiki.freemap.sk/KatasterPortal",
+ "terms_text": "Permisssion by UGKK"
},
{
"name": "Lithuania - ORT10LT",
+ "type": "tms",
"template": "http://mapproxy.openmap.lt/ort10lt/g/{z}/{x}/{y}.jpeg",
- "extents": [[
- [
- 21,
- 53.88
- ],
- [
- 26.85,
- 56.45
- ]
- ]],
"scaleExtent": [
4,
18
],
- "sourcetag": "NŽT ORT10LT"
+ "extents": [
+ [
+ [
+ 21,
+ 53.88
+ ],
+ [
+ 26.85,
+ 56.45
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "Locator Overlay",
+ "type": "tms",
+ "template": "http://{switch:a,b,c}.tiles.mapbox.com/v3/openstreetmap.map-btyhiati/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 0,
+ 16
+ ],
+ "default": true,
+ "overlay": true
+ },
+ {
+ "name": "MapBox Satellite",
+ "type": "tms",
+ "description": "Satellite and aerial imagery.",
+ "template": "http://{switch:a,b,c}.tiles.mapbox.com/v3/openstreetmap.map-4wvf9l0l/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 0,
+ 16
+ ],
+ "default": true
+ },
+ {
+ "name": "MapQuest Open Aerial",
+ "type": "tms",
+ "template": "http://oatile{switch:1,2,3,4}.mqcdn.com/tiles/1.0.0/sat/{zoom}/{x}/{y}.png",
+ "default": true
+ },
+ {
+ "name": "NLS - OS 1-inch 7th Series 1955-61",
+ "type": "tms",
+ "template": "http://geo.nls.uk/mapdata2/os/seventh/{zoom}/{x}/{-y}.png",
+ "scaleExtent": [
+ 5,
+ 16
+ ],
+ "extents": [
+ [
+ [
+ -8.6710698,
+ 49.8591793
+ ],
+ [
+ 1.7933451,
+ 60.8634056
+ ]
+ ]
+ ],
+ "terms_url": "http://geo.nls.uk/maps/",
+ "terms_text": "National Library of Scotland Historic Maps"
+ },
+ {
+ "name": "NLS - OS 1:25k 1st Series 1937-61",
+ "type": "tms",
+ "template": "http://geo.nls.uk/mapdata2/os/25000/{zoom}/{x}/{-y}.png",
+ "scaleExtent": [
+ 5,
+ 16
+ ],
+ "extents": [
+ [
+ [
+ -6.46676,
+ 49.8159968
+ ],
+ [
+ 1.8345714,
+ 58.7036341
+ ]
+ ]
+ ],
+ "terms_url": "http://geo.nls.uk/maps/",
+ "terms_text": "National Library of Scotland Historic Maps"
+ },
+ {
+ "name": "NLS - OS 6-inch Scotland 1842-82",
+ "type": "tms",
+ "template": "http://geo.nls.uk/maps/os/six_inch/{zoom}/{x}/{-y}.png",
+ "scaleExtent": [
+ 5,
+ 16
+ ],
+ "extents": [
+ [
+ [
+ -7.7901222,
+ 54.6297227
+ ],
+ [
+ -0.635467,
+ 60.8943762
+ ]
+ ]
+ ],
+ "terms_url": "http://geo.nls.uk/maps/",
+ "terms_text": "National Library of Scotland Historic Maps"
+ },
+ {
+ "name": "OS 1:25k historic (OSM)",
+ "type": "tms",
+ "template": "http://ooc.openstreetmap.org/os1/{zoom}/{x}/{y}.jpg",
+ "scaleExtent": [
+ 6,
+ 17
+ ],
+ "extents": [
+ [
+ [
+ -9,
+ 49.8
+ ],
+ [
+ 1.9,
+ 61.1
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "OS New Popular Edition historic",
+ "type": "tms",
+ "template": "http://ooc.openstreetmap.org/npe/{zoom}/{x}/{y}.png",
+ "extents": [
+ [
+ [
+ -5.8,
+ 49.8
+ ],
+ [
+ 1.9,
+ 55.8
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "OS OpenData Locator",
+ "type": "tms",
+ "template": "http://tiles.itoworld.com/os_locator/{zoom}/{x}/{y}.png",
+ "extents": [
+ [
+ [
+ -9,
+ 49.8
+ ],
+ [
+ 1.9,
+ 61.1
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "OS OpenData StreetView",
+ "type": "tms",
+ "template": "http://os.openstreetmap.org/sv/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 1,
+ 18
+ ],
+ "extents": [
+ [
+ [
+ -8.7163482,
+ 49.8673563
+ ],
+ [
+ 1.8333912,
+ 60.9103862
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "OS Scottish Popular historic",
+ "type": "tms",
+ "template": "http://ooc.openstreetmap.org/npescotland/tiles/{zoom}/{x}/{y}.jpg",
+ "scaleExtent": [
+ 6,
+ 15
+ ],
+ "extents": [
+ [
+ [
+ -7.8,
+ 54.5
+ ],
+ [
+ -1.1,
+ 61.1
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "OpenPT Map (overlay)",
+ "type": "tms",
+ "template": "http://openptmap.de/tiles/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 5,
+ 16
+ ],
+ "extents": [
+ [
+ [
+ 5.8800796,
+ 45.7953255
+ ],
+ [
+ 17.2017097,
+ 55.0952362
+ ]
+ ]
+ ],
+ "terms_url": "http://openstreetmap.org/",
+ "terms_text": "© OpenStreetMap contributors, CC-BY-SA"
+ },
+ {
+ "name": "OpenStreetMap (Mapnik)",
+ "type": "tms",
+ "description": "The default OpenStreetMap layer.",
+ "template": "http://tile.openstreetmap.org/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 0,
+ 18
+ ],
+ "terms_url": "http://openstreetmap.org/",
+ "terms_text": "© OpenStreetMap contributors, CC-BY-SA",
+ "default": true
+ },
+ {
+ "name": "Pangasinán/Bulacan (Phillipines HiRes)",
+ "type": "tms",
+ "template": "http://gravitystorm.dev.openstreetmap.org/imagery/philippines/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 12,
+ 19
+ ],
+ "extents": [
+ [
+ [
+ 120.33659,
+ 14.7025
+ ],
+ [
+ 121.2699,
+ 16.21853
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "Slovakia EEA CORINE 2006",
+ "type": "tms",
+ "template": "http://www.freemap.sk/tms/clc/{zoom}/{x}/{y}.png",
+ "extents": [
+ [
+ [
+ 16.7988747,
+ 47.7145247
+ ],
+ [
+ 22.5884098,
+ 49.6375827
+ ]
+ ]
+ ],
+ "terms_url": "http://www.eea.europa.eu/data-and-maps/data/clc-2006-vector-data-version-1",
+ "terms_text": "EEA Corine 2006"
+ },
+ {
+ "name": "Slovakia EEA GMES Urban Atlas",
+ "type": "tms",
+ "template": "http://www.freemap.sk/tms/urbanatlas/{zoom}/{x}/{y}.png",
+ "extents": [
+ [
+ [
+ 16.7988747,
+ 47.7145247
+ ],
+ [
+ 22.5884098,
+ 49.6375827
+ ]
+ ]
+ ],
+ "terms_url": "http://www.eea.europa.eu/data-and-maps/data/urban-atlas",
+ "terms_text": "EEA GMES Urban Atlas"
+ },
+ {
+ "name": "Slovakia Historic Maps",
+ "type": "tms",
+ "template": "http://tms.freemap.sk/historicke/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 0,
+ 12
+ ],
+ "extents": [
+ [
+ [
+ 16.8196949,
+ 47.4927236
+ ],
+ [
+ 22.8388318,
+ 49.5030322
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "South Africa CD:NGI Aerial",
+ "type": "tms",
+ "template": "http://{switch:a,b,c}.aerial.openstreetmap.org.za/ngi-aerial/{zoom}/{x}/{y}.jpg",
+ "scaleExtent": [
+ 1,
+ 22
+ ],
+ "extents": [
+ [
+ [
+ 16.4491046,
+ -34.8379056
+ ],
+ [
+ 32.899986,
+ -22.1186426
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "Stadt Uster Orthophoto 2008 10cm",
+ "type": "tms",
+ "template": "http://mapproxy.sosm.ch:8080/tiles/uster/EPSG900913/{zoom}/{x}/{y}.png?origin=nw",
+ "extents": [
+ [
+ [
+ 8.6,
+ 47.31
+ ],
+ [
+ 8.77,
+ 47.39
+ ]
+ ]
+ ],
+ "terms_text": "Stadt Uster Vermessung Orthophoto 2008"
+ },
+ {
+ "name": "Stevns (Denmark)",
+ "type": "tms",
+ "template": "http://{switch:a,b,c}.tile.openstreetmap.dk/stevns/2009/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 0,
+ 20
+ ],
+ "extents": [
+ [
+ [
+ 12.0913942,
+ 55.2340267
+ ],
+ [
+ 12.4707413,
+ 55.4364665
+ ]
+ ]
+ ],
+ "terms_text": "Stevns Kommune"
+ },
+ {
+ "name": "Surrey Air Survey",
+ "type": "tms",
+ "template": "http://gravitystorm.dev.openstreetmap.org/surrey/{zoom}/{x}/{y}.png",
+ "extents": [
+ [
+ [
+ -0.856,
+ 51.071
+ ],
+ [
+ 0.062,
+ 51.473
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "TIGER 2012 Roads Overlay",
+ "type": "tms",
+ "description": "Public domain road data from the US Government.",
+ "template": "http://{switch:a,b,c}.tile.openstreetmap.us/tiger2012_roads_expanded/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 16,
+ 19
+ ],
+ "extents": [
+ [
+ [
+ -178.000097,
+ 18.7586966
+ ],
+ [
+ -66.9452845,
+ 71.5633329
+ ]
+ ]
+ ],
+ "overlay": true
+ },
+ {
+ "name": "Toulouse - Orthophotoplan 2007",
+ "type": "tms",
+ "template": "http://wms.openstreetmap.fr/tms/1.0.0/toulouse_ortho2007/{zoom}/{x}/{y}",
+ "scaleExtent": [
+ 0,
+ 22
+ ],
+ "extents": [
+ [
+ [
+ 1.1919978,
+ 43.5102543
+ ],
+ [
+ 1.5810859,
+ 43.7312235
+ ]
+ ]
+ ],
+ "terms_url": "https://wiki.openstreetmap.org/wiki/Toulouse/ToulouseMetropoleData",
+ "terms_text": "ToulouseMetropole"
+ },
+ {
+ "name": "Toulouse - Orthophotoplan 2011",
+ "type": "tms",
+ "template": "http://wms.openstreetmap.fr/tms/1.0.0/toulouse_ortho2011/{zoom}/{x}/{y}",
+ "scaleExtent": [
+ 0,
+ 22
+ ],
+ "extents": [
+ [
+ [
+ 1.1135067,
+ 43.5094658
+ ],
+ [
+ 1.6384146,
+ 43.7815757
+ ]
+ ]
+ ],
+ "terms_url": "https://wiki.openstreetmap.org/wiki/Toulouse/ToulouseMetropoleData",
+ "terms_text": "ToulouseMetropole"
+ },
+ {
+ "name": "Tours - Orthophotos 2008",
+ "type": "tms",
+ "template": "http://tms.mapspot.ge/tms/2/nonstandard/{zoom}/{x}/{y}.jpeg",
+ "extents": [
+ [
+ [
+ 0.4541016,
+ 47.3369074
+ ],
+ [
+ 0.77497,
+ 47.4881952
+ ]
+ ]
+ ],
+ "terms_url": "http://wiki.openstreetmap.org/wiki/Tours/Orthophoto",
+ "terms_text": "Orthophoto Tour(s) Plus 2008"
+ },
+ {
+ "name": "Tours - Orthophotos 2008-2010",
+ "type": "tms",
+ "template": "http://wms.openstreetmap.fr/tms/1.0.0/tours/{zoom}/{x}/{y}",
+ "scaleExtent": [
+ 0,
+ 20
+ ],
+ "extents": [
+ [
+ [
+ 0.3864341,
+ 47.2594616
+ ],
+ [
+ 0.8201963,
+ 47.4911439
+ ]
+ ]
+ ],
+ "terms_url": "http://wiki.openstreetmap.org/wiki/Tours/Orthophoto",
+ "terms_text": "Orthophoto Tour(s) Plus 2008"
+ },
+ {
+ "name": "USGS Large Scale Imagery",
+ "type": "tms",
+ "template": "http://{switch:a,b,c}.tile.openstreetmap.us/usgs_large_scale/{zoom}/{x}/{y}.jpg",
+ "scaleExtent": [
+ 12,
+ 20
+ ],
+ "extents": [
+ [
+ [
+ -124.8185282,
+ 24.496294
+ ],
+ [
+ -66.9311098,
+ 49.4425264
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "USGS Topographic Maps",
+ "type": "tms",
+ "template": "http://{switch:a,b,c}.tile.openstreetmap.us/usgs_scanned_topos/{zoom}/{x}/{y}.png",
+ "extents": [
+ [
+ [
+ -178.000097,
+ 18.9023432
+ ],
+ [
+ -65.9892568,
+ 71.9983391
+ ]
+ ]
+ ]
+ },
+ {
+ "name": "Vejmidte (Denmark)",
+ "type": "tms",
+ "template": "http://{switch:a,b,c}.tile.openstreetmap.dk/danmark/vejmidte/{zoom}/{x}/{y}.png",
+ "scaleExtent": [
+ 0,
+ 20
+ ],
+ "extents": [
+ [
+ [
+ 8.0185123,
+ 54.4681655
+ ],
+ [
+ 15.309925,
+ 57.8228945
+ ]
+ ]
+ ],
+ "terms_url": "http://wiki.openstreetmap.org/wiki/Vejmidte",
+ "terms_text": "Danish municipalities"
+ },
+ {
+ "name": "Vienna: Beschriftungen (annotations)",
+ "type": "tms",
+ "template": "http://www.wien.gv.at/wmts/beschriftung/normal/google3857/{zoom}/{y}/{x}.png",
+ "scaleExtent": [
+ 0,
+ 19
+ ],
+ "extents": [
+ [
+ [
+ 16.17,
+ 48.1
+ ],
+ [
+ 16.58,
+ 48.33
+ ]
+ ]
+ ],
+ "terms_url": "http://data.wien.gv.at/",
+ "terms_text": "Stadt Wien"
+ },
+ {
+ "name": "Vienna: Mehrzweckkarte (general purpose)",
+ "type": "tms",
+ "template": "http://www.wien.gv.at/wmts/fmzk/pastell/google3857/{zoom}/{y}/{x}.jpeg",
+ "scaleExtent": [
+ 0,
+ 19
+ ],
+ "extents": [
+ [
+ [
+ 16.17,
+ 48.1
+ ],
+ [
+ 16.58,
+ 48.33
+ ]
+ ]
+ ],
+ "terms_url": "http://data.wien.gv.at/",
+ "terms_text": "Stadt Wien"
+ },
+ {
+ "name": "Vienna: Orthofoto (aerial image)",
+ "type": "tms",
+ "template": "http://www.wien.gv.at/wmts/lb/farbe/google3857/{zoom}/{y}/{x}.jpeg",
+ "scaleExtent": [
+ 0,
+ 19
+ ],
+ "extents": [
+ [
+ [
+ 16.17,
+ 48.1
+ ],
+ [
+ 16.58,
+ 48.33
+ ]
+ ]
+ ],
+ "terms_url": "http://data.wien.gv.at/",
+ "terms_text": "Stadt Wien"
}
-]
+]
\ No newline at end of file
diff --git a/data/imagery.xml b/data/imagery.xml
deleted file mode 100644
index 2eebaf45d..000000000
--- a/data/imagery.xml
+++ /dev/null
@@ -1,223 +0,0 @@
-
-
-
- Bing aerial imagery
- http://ecn.t${0|1|2|3}.tiles.virtualearth.net/tiles/a$quadkey.jpeg?g=587&mkt=en-gb&n=z
- microsoft
- Bing
- http://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial/0,0?zl=1&mapVersion=v1&key=Arzdiw4nlOJzRwOz__qailc8NiR31Tt51dN2D7cm57NrnceZnCpgOkmJhNpGoppU&include=ImageryProviders&output=xml
- bing_maps.png
- http://www.bing.com/maps
- http://opengeodata.org/microsoft-imagery-details
- yes
-
-
- MapBox Satellite
- http://${a|b|c}.tiles.mapbox.com/v3/openstreetmap.map-4wvf9l0l/$z/$x/$y.png
- http://mapbox.com/tos/
-
-
- MapQuest Open Aerial
- http://oatile1.mqcdn.com/tiles/1.0.0/sat/$z/$x/$y.jpg
- http://developer.mapquest.com/web/products/open/map#terms
-
-
- OSM - Mapnik
- http://${a|b|c}.tile.openstreetmap.org/$z/$x/$y.png
-
-
- OSM - OpenCycleMap
- http://tile.opencyclemap.org/cycle/$z/$x/$y.png
-
-
- OSM - MapQuest
- http://otile1.mqcdn.com/tiles/1.0.0/osm/$z/$x/$y.jpg
-
-
- OSM - Tiger Edited Map
- 900913
- http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/$z/$x/$y.png
-
-
- OSM - Tiger Edited Map
- 900913
- http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/$z/$x/$y.png
-
-
- OSM - Tiger Edited Map
- 900913
- http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/$z/$x/$y.png
-
-
- OSM US TIGER 2012 Roads Overlay
- 900913
- http://${a|b|c}.tile.openstreetmap.us/tiger2012_roads_expanded/$z/$x/$y.png
-
-
- OSM US TIGER 2012 Roads Overlay
- 900913
- http://${a|b|c}.tile.openstreetmap.us/tiger2012_roads_expanded/$z/$x/$y.png
-
-
- OSM US TIGER 2012 Roads Overlay
- 900913
- http://${a|b|c}.tile.openstreetmap.us/tiger2012_roads_expanded/$z/$x/$y.png
-
-
- OSM US USGS Topographic Maps
- 900913
- http://${a|b|c}.tile.openstreetmap.us/usgs_scanned_topos/$z/$x/$y.png
-
-
- OSM US USGS Topographic Maps
- 900913
- http://${a|b|c}.tile.openstreetmap.us/usgs_scanned_topos/$z/$x/$y.png
-
-
- OSM US USGS Topographic Maps
- 900913
- http://${a|b|c}.tile.openstreetmap.us/usgs_scanned_topos/$z/$x/$y.png
-
-
- OSM US USGS Large Scale Aerial Imagery
- 900913
- http://${a|b|c}.tile.openstreetmap.us/usgs_large_scale/$z/$x/$y.jpg
-
-
- British Columbia bc_mosaic
- 900913
- http://${a|b|c|d}.imagery.paulnorman.ca/tiles/bc_mosaic/$z/$x/$y.png
- http://imagery.paulnorman.ca/tiles/about.html
- bc_mosaic
-
-
- OS OpenData Streetview
- http://os.openstreetmap.org/sv/$z/$x/$y.png
- OS_OpenData_StreetView
-
-
- OS OpenData Locator
- http://tiles.itoworld.com/os_locator/$z/$x/$y.png
- OS_OpenData_Locator
- source:name
-
-
- OS 1:25k historic (OSM)
- http://ooc.openstreetmap.org/os1/$z/$x/$y.jpg
- OS 1:25k
-
-
- OS 1:25k historic (NLS)
- tms
- http://geo.nls.uk/mapdata2/os/25000/$z/$x/$y.png
- icons/logo_nls70-nq8.png
- http://geo.nls.uk/maps/
- OS 1:25k
-
-
- OS 7th Series historic (OSM)
- http://ooc.openstreetmap.org/os7/$z/$x/$y.jpg
- OS7
-
-
- OS 7th Series historic (NLS)
- tms
- http://geo.nls.uk/mapdata2/os/seventh/$z/$x/$y.png
- icons/logo_nls70-nq8.png
- http://geo.nls.uk/maps/
- OS7
-
-
- OS New Popular Edition historic
- http://ooc.openstreetmap.org/npe/$z/$x/$y.png
- NPE
-
-
- OS Scottish Popular historic
- http://ooc.openstreetmap.org/npescotland/tiles/$z/$x/$y.jpg
- NPE
-
-
- Surrey aerial
- http://gravitystorm.dev.openstreetmap.org/surrey/$z/$x/$y.png
- Surrey aerial
-
-
- Port au Prince - GeoEye Jan 2010
- http://gravitystorm.dev.openstreetmap.org/imagery/haiti/$z/$x/$y.png
- Port au Prince GeoEye, 2010-01
-
-
- Haiti - IOM Drone Imagery, 2012-13
- http://wms.openstreetmap.fr/tms/1.0.0/iomhaiti/{zoom}/{x}/{y}
- iom_image2013
-
-
- National Agriculture Imagery Program
- http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/$z/$x/$y.png
- NAIP
-
-
- National Agriculture Imagery Program
- http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/$z/$x/$y.png
- NAIP
-
-
- Ireland - NLS Historic Maps
- tms
- NLS Historic Maps
- http://geo.nls.uk/maps/ireland/gsgs4136/$z/$x/$y.png
- icons/logo_nls70-nq8.png
- http://geo.nls.uk/maps/
-
-
- Denmark - Fugro Aerial Imagery
- http://tile.openstreetmap.dk/fugro2005/$z/$x/$y.jpg
- Fugro (2005)
-
-
- Denmark - Stevns Kommune
- http://tile.openstreetmap.dk/stevns/2009/$z/$x/$y.jpg
- Stevns Kommune (2009)
-
-
- Austria - geoimage.at
- http://geoimage.openstreetmap.at/4d80de696cd562a63ce463a58a61488d/$z/$x/$y.jpg
- geoimage.at
-
-
- Russia - Kosmosnimki.ru IRS Satellite
- http://irs.gis-lab.info/?layers=irs&request=GetTile&z=$z&x=$x&y=$y
- Kosmosnimki.ru IRS
-
-
- Belarus - Kosmosnimki.ru SPOT4 Satellite
- http://irs.gis-lab.info/?layers=spot&request=GetTile&z=$z&x=$x&y=$y
- Kosmosnimki.ru SPOT4
-
-
- Australia - Geographic Reference Image
- http://agri.openstreetmap.org/$z/$x/$y.png
- AGRI
-
-
- Switzerland - Canton Aargau - AGIS 25cm 2011
- http://tiles.poole.ch/AGIS/OF2011/$z/$x/$y.png
- AGIS OF2011
-
-
- Switzerland - Canton Solothurn - SOGIS 2007
- http://mapproxy.sosm.ch:8080/tiles/sogis2007/EPSG900913/$z/$x/$y.png?origin=nw
- Orthofoto 2007 WMS Solothurn
-
-
- Poland - Media-Lab fleet GPS masstracks
- http://masstracks.media-lab.com.pl/$z/$x/$y.png
- masstracks
-
-
- South Africa - CD:NGI Aerial
- http://${a|b|c}.aerial.openstreetmap.org.za/ngi-aerial/$z/$x/$y.jpg
- ngi-aerial
-
-
diff --git a/data/imagery_convert.js b/data/imagery_convert.js
deleted file mode 100644
index 375146e09..000000000
--- a/data/imagery_convert.js
+++ /dev/null
@@ -1,86 +0,0 @@
-var fs = require('fs'),
- cheerio = require('cheerio');
-
-$ = cheerio.load(fs.readFileSync('imagery.xml'));
-
-var imagery = [];
-
-// CENSORSHIP! No, these are just layers that essentially duplicate other layers
-// or which have no clear use case.
-var censor = {
- 'MapQuest Open Aerial': true,
- 'OSM - OpenCycleMap': true,
- 'OSM - MapQuest': true
-};
-
-var replace = {
- 'OSM - Mapnik': 'OpenStreetMap',
- 'National Agriculture Imagery Program': 'NAIP'
-};
-
-var description = {
- 'MapBox Satellite': 'Satellite and aerial imagery.',
- 'OpenStreetMap': 'The default OpenStreetMap layer.',
- 'OSM US TIGER 2012 Roads Overlay': 'Public domain road data from the US Government.',
- 'Bing aerial imagery': 'Satellite imagery.',
- 'NAIP': 'National Agriculture Imagery Program'
-};
-
-var scaleExtent = {
- 'MapBox Satellite': [0, 16],
- 'OpenStreetMap': [0, 18],
- 'OSM US TIGER 2012 Roads Overlay': [0, 17],
- 'Bing aerial imagery': [0, 20]
-};
-
-$('set').each(function(i) {
- var elem = $(this);
-
- var im = {
- name: $(this).find('name').first().text(),
- template: $(this).find('url').first().text()
- };
-
- // no luck with mapquest servers currently...
- if (im.template.match(/mapquest/g)) return;
- if (censor[im.name]) return;
-
- im.name = im.name.replace('OSM US', '');
-
- if (replace[im.name]) im.name = replace[im.name];
-
- if (description[im.name]) im.description = description[im.name];
-
- if (scaleExtent[im.name]) im.scaleExtent = scaleExtent[im.name];
-
- var subdomains = [];
-
- im.template = im.template
- .replace('$quadkey', '{u}')
- .replace(/\$(\w)/g, function(m) {
- return '{' + m[1] + '}';
- })
- .replace(/\$\{([^}.]+)\}/g, function(m) {
- subdomains = m.slice(2, m.length - 1).split('|');
- return '{t}';
- });
-
- if (subdomains.length) im.subdomains = subdomains;
-
- if (elem.attr('minlat')) {
- im.extent = [
- [+elem.attr('minlon'),
- +elem.attr('minlat')],
- [+elem.attr('maxlon'),
- +elem.attr('maxlat')]];
- }
-
- ['default', 'sourcetag', 'logo', 'logo_url', 'terms_url'].forEach(function(a) {
- if (elem.find(a).length) {
- im[a] = elem.find(a).first().text();
- }
- });
- imagery.push(im);
-});
-
-fs.writeFileSync('imagery.json', JSON.stringify(imagery, null, 4));
diff --git a/data/update_imagery.js b/data/update_imagery.js
new file mode 100644
index 000000000..b8434b923
--- /dev/null
+++ b/data/update_imagery.js
@@ -0,0 +1,82 @@
+var fs = require('fs');
+var sources = require('editor-imagery-index/imagery.json');
+var imagery = [];
+
+// CENSORSHIP! No, these are just layers that essentially duplicate other layers
+// or which have no clear use case.
+var censor = {
+ "2u": true,
+ "Hike & Bike": true,
+ "OpenCycleMap": true,
+ "OpenStreetMap (German Language)": true,
+ "OpenStreetMap (German Style)": true,
+ "OpenStreetMap (Sorbian Language)": true,
+ "MapQuest OSM": true,
+ "OpenStreetMap (Mapnik Black & White)": true,
+ "Skobbler": true,
+
+ "Stadtplan Z\u00fcrich": true, // https://github.com/osmlab/editor-imagery-index/issues/14
+ "Public Transport (\u00d6PNV)": true // https://github.com/osmlab/editor-imagery-index/issues/15
+};
+
+var description = {
+ 'MapBox Satellite': 'Satellite and aerial imagery.',
+ 'OpenStreetMap (Mapnik)': 'The default OpenStreetMap layer.',
+ 'TIGER 2012 Roads Overlay': 'Public domain road data from the US Government.',
+ 'Bing aerial imagery': 'Satellite and aerial imagery.',
+ 'NAIP': 'National Agriculture Imagery Program'
+};
+
+sources.forEach(function(source) {
+ if (source.type !== 'tms' && source.type !== 'bing')
+ return;
+ if (source.name in censor)
+ return;
+
+ var im = {
+ name: source.name,
+ type: source.type
+ };
+
+ if (description[im.name]) im.description = description[im.name];
+
+ im.template = source.url;
+
+ var extent = source.extent || {};
+
+ if (extent.min_zoom || extent.max_zoom) {
+ im.scaleExtent = [
+ +(extent.min_zoom || 0),
+ +(extent.max_zoom || 20)
+ ];
+ }
+
+ if (extent.bbox) {
+ im.extents = [[
+ [+extent.bbox.min_lon, +extent.bbox.min_lat],
+ [+extent.bbox.max_lon, +extent.bbox.max_lat]
+ ]];
+ }
+
+ var attribution = source.attribution || {};
+ if (attribution.url) {
+ im.terms_url = attribution.url;
+ }
+ if (attribution.text) {
+ im.terms_text = attribution.text;
+ }
+
+ ['id', 'default', 'overlay'].forEach(function(a) {
+ if (source[a]) {
+ im[a] = source[a];
+ }
+ });
+
+ imagery.push(im);
+});
+
+imagery.sort(function(a, b) {
+ return a.name.localeCompare(b.name);
+});
+
+fs.writeFileSync('data/imagery.json', JSON.stringify(imagery, null, 4));
diff --git a/js/id/renderer/background.js b/js/id/renderer/background.js
index 84aaa2b43..f88175433 100644
--- a/js/id/renderer/background.js
+++ b/js/id/renderer/background.js
@@ -7,31 +7,31 @@ iD.Background = function(context) {
overlayLayers = [];
var backgroundSources = iD.data.imagery.map(function(source) {
- if (source.sourcetag === 'Bing') {
+ if (source.type === 'bing') {
return iD.BackgroundSource.Bing(source, dispatch);
} else {
return iD.BackgroundSource(source);
}
});
- function findSource(sourcetag) {
+ function findSource(id) {
return _.find(backgroundSources, function(d) {
- return d.sourcetag && d.sourcetag === sourcetag;
+ return d.id && d.id === id;
});
}
function updateImagery() {
var b = background.baseLayerSource(),
- o = overlayLayers.map(function (d) { return d.source().sourcetag; }).join(','),
+ o = overlayLayers.map(function (d) { return d.source().id; }).join(','),
q = iD.util.stringQs(location.hash.substring(1));
- var tag = b.sourcetag;
- if (!tag && b.name === 'Custom') {
- tag = 'custom:' + b.template;
+ var id = b.id;
+ if (!id && b.name === 'Custom') {
+ id = 'custom:' + b.template;
}
- if (tag) {
- q.background = tag;
+ if (id) {
+ q.background = id;
} else {
delete q.background;
}
@@ -48,13 +48,13 @@ iD.Background = function(context) {
if (b.name === 'Custom') {
imageryUsed.push('Custom (' + b.template + ')');
} else {
- imageryUsed.push(b.sourcetag || b.name);
+ imageryUsed.push(b.id || b.name);
}
overlayLayers.forEach(function (d) {
var source = d.source();
if (!source.isLocatorOverlay()) {
- imageryUsed.push(source.sourcetag || source.name);
+ imageryUsed.push(source.id || source.name);
}
});
diff --git a/js/id/renderer/background_source.js b/js/id/renderer/background_source.js
index 440172a4b..558fe06a6 100644
--- a/js/id/renderer/background_source.js
+++ b/js/id/renderer/background_source.js
@@ -17,29 +17,15 @@ iD.BackgroundSource = function(data) {
};
source.url = function(coord) {
- var u = '';
- for (var zoom = coord[2]; zoom > 0; zoom--) {
- var b = 0;
- var mask = 1 << (zoom - 1);
- if ((coord[0] & mask) !== 0) b++;
- if ((coord[1] & mask) !== 0) b += 2;
- u += b.toString();
- }
-
return data.template
- .replace('{t}', data.subdomains ?
- data.subdomains[(coord[0] + coord[1]) % data.subdomains.length] : '')
- .replace('{u}', u)
.replace('{x}', coord[0])
.replace('{y}', coord[1])
// TMS-flipped y coordinate
.replace('{ty}', Math.pow(2, coord[2]) - coord[1] - 1)
- .replace('{z}', coord[2])
- // JOSM style
- .replace('{zoom}', coord[2])
- .replace(/\{(switch\:[^\}]*)\}/, function(s, r) {
- var subdomains = r.split(':')[1].split(',');
- return subdomains[coord[2] % subdomains.length];
+ .replace(/\{z(oom)?\}/, coord[2])
+ .replace(/\{switch:([^}]+)\}/, function(s, r) {
+ var subdomains = r.split(',');
+ return subdomains[(coord[0] + coord[1]) % subdomains.length];
});
};
@@ -88,6 +74,25 @@ iD.BackgroundSource.Bing = function(data, dispatch) {
dispatch.change();
});
+ var template = "http://ecn.t{t}.tiles.virtualearth.net/tiles/a{u}.jpeg?g=587&mkt=en-gb&n=z",
+ subdomains = [0, 1, 2, 3];
+
+ bing.url = function(coord) {
+ var u = '';
+
+ for (var zoom = coord[2]; zoom > 0; zoom--) {
+ var b = 0;
+ var mask = 1 << (zoom - 1);
+ if ((coord[0] & mask) !== 0) b++;
+ if ((coord[1] & mask) !== 0) b += 2;
+ u += b.toString();
+ }
+
+ return template
+ .replace('{t}', subdomains[(coord[0] + coord[1]) % 4])
+ .replace('{u}', u);
+ };
+
bing.copyrightNotices = function(zoom, extent) {
zoom = Math.min(zoom, 21);
return providers.filter(function(provider) {
@@ -101,5 +106,8 @@ iD.BackgroundSource.Bing = function(data, dispatch) {
}).join(', ');
};
+ bing.logo = "bing_maps.png";
+ bing.terms_url = "http://opengeodata.org/microsoft-imagery-details";
+
return bing;
};
diff --git a/js/id/ui/attribution.js b/js/id/ui/attribution.js
index bd499f7a1..cfa912131 100644
--- a/js/id/ui/attribution.js
+++ b/js/id/ui/attribution.js
@@ -14,7 +14,7 @@ iD.ui.Attribution = function(context) {
.append('span')
.attr('class', 'provided-by')
.each(function(d) {
- var source = d.sourcetag || d.name;
+ var source = d.terms_text || d.id || d.name;
if (d.logo) {
source = '
';
diff --git a/package.json b/package.json
index d48523636..6676b2b3c 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,8 @@
"request": "~2.16.2",
"jsonschema": "~0.3.2",
"node-sprite": "~0.1.2",
- "delve": "0.2"
+ "delve": "0.2",
+ "editor-imagery-index": "git://github.com/osmlab/editor-imagery-index.git#gh-pages"
},
"engines": {
"node": ">=0.10.0"