diff --git a/README.md b/README.md index 08c6764c0..8cf1daeeb 100644 --- a/README.md +++ b/README.md @@ -2,30 +2,28 @@ [![Build Status](https://secure.travis-ci.org/systemed/iD.png)](https://travis-ci.org/systemed/iD) -[![](http://ideditor.com/img/editor.png)](http://geowiki.com/iD/) - -[Try the online demo of the most recent code.](http://geowiki.com/iD/) and -[open issues for bugs and ideas!](https://github.com/systemed/iD/issues) +[![](http://ideditor.com/img/editor.png)](http://ideditor.com/) ## Basics * iD is a JavaScript [OpenStreetMap](http://www.openstreetmap.org/) editor. * It's intentionally simple. It lets you do the most basic tasks while not breaking other people's data. -* We support modern browsers. Data is rendered with [d3](http://d3js.org/). +* It supports modern browsers. Data is rendered with [d3](http://d3js.org/). ## Participate! +* [Try out the latest stable release](http://geowiki.com/iD/) * [Read up on Contributing and the code style of iD](CONTRIBUTING.md) -* See [open issues in the issue tracker if you're looking for something to do](https://github.com/systemed/iD/issues?state=open) +* See [open issues in the issue tracker](https://github.com/systemed/iD/issues?state=open) if you're looking for something to do -To run the code locally, just fork this project and run it from a local webserver. -With a Mac, you can enable Web Sharing and drop this in your website directory. - -If you have Python handy, just `cd` into `iD` and run +To run the current development version, fork this project and serve it locally. +If you have Python handy, just `cd` into the project root directory and run python -m SimpleHTTPServer +Or, with a Mac, you can enable Web Sharing and clone iD into your website directory. + Come on in, the water's lovely. More help? Ping RichardF, tmcw, or jfire on IRC (`irc.oftc.net`, in `#osm-dev` or `#osm`), on the OSM mailing lists or at richard@systemeD.net. diff --git a/css/app.css b/css/app.css index e660d5989..a43133f3d 100644 --- a/css/app.css +++ b/css/app.css @@ -273,7 +273,12 @@ button.active { cursor:url(../img/cursor-pointing.png) 6 1, auto; } -button.active:not([disabled]) { +button.disabled { + background: #6c6c6c; + cursor: auto; +} + +button.active:not([disabled]):not(.disabled) { background: #6bc641; } @@ -450,8 +455,8 @@ button[disabled] .icon.browse { background-position: 0px -40px;} button[disabled] .icon.add-point { background-position: -20px -40px;} button[disabled] .icon.add-line { background-position: -40px -40px;} button[disabled] .icon.add-area { background-position: -60px -40px;} -button[disabled] .icon.undo { background-position: -80px -40px;} -button[disabled] .icon.redo { background-position: -100px -40px;} +button.disabled .icon.undo { background-position: -80px -40px;} +button.disabled .icon.redo { background-position: -100px -40px;} button[disabled] .apply.icon { background-position: -120px -40px;} button[disabled] .save.icon { background-position: -140px -40px;} button[disabled] .close.icon { background-position: -160px -40px;} diff --git a/css/map.css b/css/map.css index 0b2da4397..64110111d 100644 --- a/css/map.css +++ b/css/map.css @@ -119,6 +119,14 @@ g.vertex.selected .shadow { /* midpoints */ +.mode-draw-area g.midpoint, +.mode-draw-line g.midpoint, +.mode-add-area g.midpoint, +.mode-add-line g.midpoint, +.mode-add-point g.midpoint { + display: none; +} + g.midpoint .fill { fill:#ddd; stroke:black; @@ -635,7 +643,7 @@ text.pointlabel { } .pathlabel .textpath { - dominant-baseline: middle; + baseline-shift: -33%; } .pointlabel-halo, diff --git a/data/data.js b/data/data.js new file mode 100644 index 000000000..279b1ea86 --- /dev/null +++ b/data/data.js @@ -0,0 +1 @@ +iD.data = {}; diff --git a/data/deprecated.js b/data/deprecated.js new file mode 100644 index 000000000..7cc6904ed --- /dev/null +++ b/data/deprecated.js @@ -0,0 +1,120 @@ +// from http://wiki.openstreetmap.org/wiki/Deprecated_features +// TODO: deal with deprecated 'class' tag +// does not deal with landuse=wood because of indecision +// we will not care about http://taginfo.openstreetmap.org/tags/bicycle_parking=sheffield +iD.data.deprecated = [ + { + old: { barrier: 'wire_fence' }, + replace: { + barrier: 'fence', + fence_type: 'chain' + } + }, + { + old: { barrier: 'wood_fence' }, + replace: { + barrier: 'fence', + fence_type: 'wood' + } + }, + { + old: { highway: 'ford' }, + replace: { + ford: 'yes' + } + }, + { + old: { highway: 'ford' }, + replace: { + ford: 'yes' + } + }, + { + old: { highway: 'ford' }, + replace: { + ford: 'yes' + } + }, + { + old: { highway: 'stile' }, + replace: { + barrier: 'stile' + } + }, + { + old: { highway: 'incline' }, + replace: { + highway: 'road', + incline: 'up' + } + }, + { + old: { highway: 'incline_steep' }, + replace: { + highway: 'road', + incline: 'up' + } + }, + { + old: { highway: 'unsurfaced' }, + replace: { + highway: 'road', + incline: 'unpaved' + } + }, + { + old: { highway: 'unsurfaced' }, + replace: { + highway: 'road', + incline: 'unpaved' + } + }, + { + old: { landuse: 'wood' }, + replace: { + highway: 'road', + incline: 'unpaved' + } + }, + { + old: { natural: 'marsh' }, + replace: { + natural: 'wetland', + wetland: 'marsh' + } + }, + { + old: { shop: 'organic' }, + replace: { + shop: 'supermarket', + organic: 'only' + } + }, + { + old: { power_source: '*' }, + replace: { + 'generator:source': '$1' + } + }, + { + old: { power_rating: '*' }, + replace: { + 'generator:output': '$1' + } + }, + { + old: { bicycle_parking: 'organic' }, + replace: { + shop: 'supermarket', + organic: 'only' + } + }, + // entirely discarded tags + { old: { 'tiger:upload_uuid': '*' } }, + { old: { 'tiger:tlid': '*' } }, + { old: { 'tiger:source': '*' } }, + { old: { 'tiger:separated': '*' } }, + { old: { 'geobase:datasetName': '*' } }, + { old: { 'geobase:uuid': '*' } }, + { old: { 'sub_sea:type': '*' } } +]; diff --git a/data/imagery.json b/data/imagery.json new file mode 100644 index 000000000..2055c1cf5 --- /dev/null +++ b/data/imagery.json @@ -0,0 +1,490 @@ +[ + { + "name": "Bing aerial imagery", + "url": "http://ecn.t0.tiles.virtualearth.net/tiles/a{q}uadkey.jpeg?g=587&mkt=en-gb&n=z", + "sourcetag": "Bing", + "logo": "bing_maps.png", + "logo_url": "http://www.bing.com/maps", + "terms_url": "http://opengeodata.org/microsoft-imagery-details" + }, + { + "name": "MapBox Satellite", + "url": "http://{t}.tiles.mapbox.com/v3/openstreetmap.map-4wvf9l0l/{z}/{x}/{y}.png", + "subdomains": [ + "a", + "b", + "c" + ] + }, + { + "name": "MapQuest Open Aerial", + "url": "http://oatile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg" + }, + { + "name": "OSM - Mapnik", + "url": "http://{t}.tile.openstreetmap.org/{z}/{x}/{y}.png", + "subdomains": [ + "a", + "b", + "c" + ] + }, + { + "name": "OSM - OpenCycleMap", + "url": "http://tile.opencyclemap.org/cycle/{z}/{x}/{y}.png" + }, + { + "name": "OSM - MapQuest", + "url": "http://otile1.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg" + }, + { + "name": "OSM - Tiger Edited Map", + "url": "http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/{z}/{x}/{y}.png", + "extent": [ + 24.055, + -124.81, + 49.386, + -66.865 + ] + }, + { + "name": "OSM - Tiger Edited Map", + "url": "http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/{z}/{x}/{y}.png", + "extent": [ + 50.858, + -179.754, + 71.463, + -129.899 + ] + }, + { + "name": "OSM - Tiger Edited Map", + "url": "http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/{z}/{x}/{y}.png", + "extent": [ + 18.702, + -174.46, + 26.501, + -154.516 + ] + }, + { + "name": "OSM US TIGER 2012 Roads Overlay", + "url": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png", + "subdomains": [ + "a", + "b", + "c" + ], + "extent": [ + 24.055, + -124.81, + 49.386, + -66.865 + ] + }, + { + "name": "OSM US TIGER 2012 Roads Overlay", + "url": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png", + "subdomains": [ + "a", + "b", + "c" + ], + "extent": [ + 50.858, + -179.754, + 71.463, + -129.899 + ] + }, + { + "name": "OSM US TIGER 2012 Roads Overlay", + "url": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png", + "subdomains": [ + "a", + "b", + "c" + ], + "extent": [ + 18.702, + -174.46, + 26.501, + -154.516 + ] + }, + { + "name": "OSM US USGS Topographic Maps", + "url": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png", + "subdomains": [ + "a", + "b", + "c" + ], + "extent": [ + 24.005, + -125.991, + 50.009, + -65.988 + ] + }, + { + "name": "OSM US USGS Topographic Maps", + "url": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png", + "subdomains": [ + "a", + "b", + "c" + ], + "extent": [ + 18.902, + -160.579, + 22.508, + -154.793 + ] + }, + { + "name": "OSM US USGS Topographic Maps", + "url": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png", + "subdomains": [ + "a", + "b", + "c" + ], + "extent": [ + 51.255, + -178.001, + 71.999, + -130.004 + ] + }, + { + "name": "OSM US USGS Large Scale Aerial Imagery", + "url": "http://{t}.tile.openstreetmap.us/usgs_large_scale/{z}/{x}/{y}.jpg", + "subdomains": [ + "a", + "b", + "c" + ], + "extent": [ + 24.496, + -124.819, + 49.443, + -66.931 + ] + }, + { + "name": "British Columbia bc_mosaic", + "url": "http://{t}.imagery.paulnorman.ca/tiles/bc_mosaic/{z}/{x}/{y}.png", + "subdomains": [ + "a", + "b", + "c", + "d" + ], + "extent": [ + 48.995, + -123.441, + 50.426, + -121.346 + ], + "sourcetag": "bc_mosaic", + "terms_url": "http://imagery.paulnorman.ca/tiles/about.html" + }, + { + "name": "OS OpenData Streetview", + "url": "http://os.openstreetmap.org/sv/{z}/{x}/{y}.png", + "extent": [ + 49.86, + -8.72, + 60.92, + 1.84 + ], + "sourcetag": "OS_OpenData_StreetView" + }, + { + "name": "OS OpenData Locator", + "url": "http://tiles.itoworld.com/os_locator/{z}/{x}/{y}.png", + "extent": [ + 49.8, + -9, + 61.1, + 1.9 + ], + "sourcetag": "OS_OpenData_Locator" + }, + { + "name": "OS 1:25k historic (OSM)", + "url": "http://ooc.openstreetmap.org/os1/{z}/{x}/{y}.jpg", + "extent": [ + 49.8, + -9, + 61.1, + 1.9 + ], + "sourcetag": "OS 1:25k" + }, + { + "name": "OS 1:25k historic (NLS)", + "url": "http://geo.nls.uk/mapdata2/os/25000/{z}/{x}/{y}.png", + "extent": [ + 49.8, + -9, + 61.1, + 1.9 + ], + "sourcetag": "OS 1:25k", + "logo": "icons/logo_nls70-nq8.png", + "logo_url": "http://geo.nls.uk/maps/" + }, + { + "name": "OS 7th Series historic (OSM)", + "url": "http://ooc.openstreetmap.org/os7/{z}/{x}/{y}.jpg", + "extent": [ + 49.8, + -9, + 61.1, + 1.9 + ], + "sourcetag": "OS7" + }, + { + "name": "OS 7th Series historic (NLS)", + "url": "http://geo.nls.uk/mapdata2/os/seventh/{z}/{x}/{y}.png", + "extent": [ + 49.8, + -9, + 61.1, + 1.9 + ], + "sourcetag": "OS7", + "logo": "icons/logo_nls70-nq8.png", + "logo_url": "http://geo.nls.uk/maps/" + }, + { + "name": "OS New Popular Edition historic", + "url": "http://ooc.openstreetmap.org/npe/{z}/{x}/{y}.png", + "extent": [ + 49.8, + -5.8, + 55.8, + 1.9 + ], + "sourcetag": "NPE" + }, + { + "name": "OS Scottish Popular historic", + "url": "http://ooc.openstreetmap.org/npescotland/tiles/{z}/{x}/{y}.jpg", + "extent": [ + 54.5, + -7.8, + 61.1, + -1.1 + ], + "sourcetag": "NPE" + }, + { + "name": "Surrey aerial", + "url": "http://gravitystorm.dev.openstreetmap.org/surrey/{z}/{x}/{y}.png", + "extent": [ + 51.071, + -0.856, + 51.473, + 0.062 + ], + "sourcetag": "Surrey aerial" + }, + { + "name": "Haiti - GeoEye Jan 13", + "url": "http://gravitystorm.dev.openstreetmap.org/imagery/haiti/{z}/{x}/{y}.jpg", + "extent": [ + 17.95, + -74.5, + 20.12, + -71.58 + ], + "sourcetag": "Haiti GeoEye" + }, + { + "name": "Haiti - GeoEye Jan 13+", + "url": "http://maps.nypl.org/tilecache/1/geoeye/{z}/{x}/{y}.jpg", + "extent": [ + 17.95, + -74.5, + 20.12, + -71.58 + ], + "sourcetag": "Haiti GeoEye" + }, + { + "name": "Haiti - DigitalGlobe", + "url": "http://maps.nypl.org/tilecache/1/dg_crisis/{z}/{x}/{y}.jpg", + "extent": [ + 17.95, + -74.5, + 20.12, + -71.58 + ], + "sourcetag": "Haiti DigitalGlobe" + }, + { + "name": "Haiti - Street names", + "url": "http://hypercube.telascience.org/tiles/1.0.0/haiti-city/{z}/{x}/{y}.jpg", + "extent": [ + 17.95, + -74.5, + 20.12, + -71.58 + ], + "sourcetag": "Haiti streetnames" + }, + { + "name": "National Agriculture Imagery Program", + "url": "http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/{z}/{x}/{y}.png", + "extent": [ + 24.2, + -125.8, + 49.5, + -62.3 + ], + "sourcetag": "NAIP" + }, + { + "name": "National Agriculture Imagery Program", + "url": "http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/{z}/{x}/{y}.png", + "extent": [ + 55.3, + -168.5, + 71.5, + -140 + ], + "sourcetag": "NAIP" + }, + { + "name": "Ireland - NLS Historic Maps", + "url": "http://geo.nls.uk/maps/ireland/gsgs4136/{z}/{x}/{y}.png", + "extent": [ + 51.32, + -10.71, + 55.46, + -5.37 + ], + "sourcetag": "NLS Historic Maps", + "logo": "icons/logo_nls70-nq8.png", + "logo_url": "http://geo.nls.uk/maps/" + }, + { + "name": "Denmark - Fugro Aerial Imagery", + "url": "http://tile.openstreetmap.dk/fugro2005/{z}/{x}/{y}.jpg", + "extent": [ + 54.44, + 7.81, + 57.86, + 15.49 + ], + "sourcetag": "Fugro (2005)" + }, + { + "name": "Denmark - Stevns Kommune", + "url": "http://tile.openstreetmap.dk/stevns/2009/{z}/{x}/{y}.jpg", + "extent": [ + 55.23403, + 12.09144, + 55.43647, + 12.47712 + ], + "sourcetag": "Stevns Kommune (2009)" + }, + { + "name": "Austria - geoimage.at", + "url": "http://geoimage.openstreetmap.at/4d80de696cd562a63ce463a58a61488d/{z}/{x}/{y}.jpg", + "extent": [ + 46.33, + 9.36, + 49.09, + 17.28 + ], + "sourcetag": "geoimage.at" + }, + { + "name": "Russia - Kosmosnimki.ru IRS Satellite", + "url": "http://irs.gis-lab.info/?layers=irs&request=GetTile&z={z}&x={x}&y={y}", + "extent": [ + 40.96, + 19.02, + 70.48, + 77.34 + ], + "sourcetag": "Kosmosnimki.ru IRS" + }, + { + "name": "Belarus - Kosmosnimki.ru SPOT4 Satellite", + "url": "http://irs.gis-lab.info/?layers=spot&request=GetTile&z={z}&x={x}&y={y}", + "extent": [ + 51.25, + 23.16, + 56.19, + 32.83 + ], + "sourcetag": "Kosmosnimki.ru SPOT4" + }, + { + "name": "Australia - Geographic Reference Image", + "url": "http://agri.openstreetmap.org/{z}/{x}/{y}.png", + "extent": [ + -44, + 96, + -9, + 168 + ], + "sourcetag": "AGRI" + }, + { + "name": "Switzerland - Canton Aargau - AGIS 25cm 2011", + "url": "http://tiles.poole.ch/AGIS/OF2011/{z}/{x}/{y}.png", + "extent": [ + 47.13, + 7.69, + 47.63, + 8.48 + ], + "sourcetag": "AGIS OF2011" + }, + { + "name": "Switzerland - Canton Solothurn - SOGIS 2007", + "url": "http://mapproxy.sosm.ch:8080/tiles/sogis2007/EPSG900913/{z}/{x}/{y}.png?origin=nw", + "extent": [ + 47.06, + 7.33, + 47.5, + 8.04 + ], + "sourcetag": "Orthofoto 2007 WMS Solothurn" + }, + { + "name": "Poland - Media-Lab fleet GPS masstracks", + "url": "http://masstracks.media-lab.com.pl/{z}/{x}/{y}.png", + "extent": [ + 48.9, + 14, + 55, + 24.2 + ], + "sourcetag": "masstracks" + }, + { + "name": "South Africa - CD:NGI Aerial", + "url": "http://{t}.aerial.openstreetmap.org.za/ngi-aerial/{z}/{x}/{y}.jpg", + "subdomains": [ + "a", + "b", + "c" + ], + "extent": [ + -34.95, + 17.64, + -22.05, + 32.87 + ], + "sourcetag": "ngi-aerial" + } +] \ No newline at end of file diff --git a/data/imagery.xml b/data/imagery.xml new file mode 100644 index 000000000..c829ab141 --- /dev/null +++ b/data/imagery.xml @@ -0,0 +1,231 @@ + + + + Bing aerial imagery + http://ecn.t0.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 + + + MapQuest Open Aerial + http://oatile1.mqcdn.com/tiles/1.0.0/sat/$z/$x/$y.jpg + + + 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 + + + Haiti - GeoEye Jan 13 + http://gravitystorm.dev.openstreetmap.org/imagery/haiti/$z/$x/$y.jpg + Haiti GeoEye + + + Haiti - GeoEye Jan 13+ + http://maps.nypl.org/tilecache/1/geoeye/$z/$x/$y.jpg + Haiti GeoEye + + + Haiti - DigitalGlobe + http://maps.nypl.org/tilecache/1/dg_crisis/$z/$x/$y.jpg + Haiti DigitalGlobe + + + Haiti - Street names + http://hypercube.telascience.org/tiles/1.0.0/haiti-city/$z/$x/$y.jpg + Haiti streetnames + + + 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 new file mode 100644 index 000000000..16cc23317 --- /dev/null +++ b/data/imagery_convert.js @@ -0,0 +1,45 @@ +var fs = require('fs'), + cheerio = require('cheerio'); + +$ = cheerio.load(fs.readFileSync('imagery.xml')); + +var imagery = []; + +$('set').each(function(i) { + var elem = $(this); + + var im = { + name: $(this).find('name').first().text(), + url: $(this).find('url').first().text() + }; + + var subdomains = []; + + im.url = im.url + .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('minlat'), + +elem.attr('minlon'), + +elem.attr('maxlat'), + +elem.attr('maxlon')]; + } + + ['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/index.html b/index.html index 83ae066eb..c03ac29ae 100644 --- a/index.html +++ b/index.html @@ -134,6 +134,9 @@ + + +
+ @@ -130,6 +131,9 @@ + + + + diff --git a/test/spec/actions/deprecate_tags.js b/test/spec/actions/deprecate_tags.js new file mode 100644 index 000000000..61d1da4fb --- /dev/null +++ b/test/spec/actions/deprecate_tags.js @@ -0,0 +1,47 @@ +describe('iD.actions.DeprecateTags', function () { + it('deprecates tags', function () { + var entity = iD.Entity({ tags: { barrier: 'wire_fence' } }), + graph = iD.actions.DeprecateTags(entity.id)(iD.Graph([entity])), + undeprecated = { + barrier: 'fence', + fence_type: 'chain' + }; + expect(graph.entity(entity.id).tags).to.eql(undeprecated); + }); + + it('does not overwrite explicit tags', function () { + var entity = iD.Entity({ tags: { barrier: 'wire_fence', fence_type: 'foo' } }), + graph = iD.actions.DeprecateTags(entity.id)(iD.Graph([entity])), + undeprecated = { + barrier: 'fence', + fence_type: 'foo' + }; + expect(graph.entity(entity.id).tags).to.eql(undeprecated); + }); + + it('leaves other tags alone', function () { + var entity = iD.Entity({ tags: { highway: 'ford', name: 'Foo' } }), + graph = iD.actions.DeprecateTags(entity.id)(iD.Graph([entity])), + undeprecated = { + ford: 'yes', + name: 'Foo' + }; + expect(graph.entity(entity.id).tags).to.eql(undeprecated); + }); + + it('wipes out tags that should be entirely removed', function () { + var entity = iD.Entity({ tags: { 'tiger:source': 'foo' } }), + graph = iD.actions.DeprecateTags(entity.id)(iD.Graph([entity])), + undeprecated = { }; + expect(graph.entity(entity.id).tags).to.eql(undeprecated); + }); + + it('replaces keys', function () { + var entity = iD.Entity({ tags: { power_rating: '1 billion volts' } }), + graph = iD.actions.DeprecateTags(entity.id)(iD.Graph([entity])), + undeprecated = { + 'generator:output': '1 billion volts' + }; + expect(graph.entity(entity.id).tags).to.eql(undeprecated); + }); +}); diff --git a/test/spec/graph/entity.js b/test/spec/graph/entity.js index f2ac85f17..f0b7e0b19 100644 --- a/test/spec/graph/entity.js +++ b/test/spec/graph/entity.js @@ -114,6 +114,16 @@ describe('iD.Entity', function () { }); }); + describe("#hasDeprecatedTags", function () { + it("returns false if entity has no tags", function () { + expect(iD.Entity().deprecatedTags()).to.eql({}); + }); + + it("returns true if entity has deprecated tags", function () { + expect(iD.Entity({ tags: { barrier: 'wire_fence' } }).deprecatedTags()).to.eql({ barrier: 'wire_fence' }); + }); + }); + describe("#hasInterestingTags", function () { it("returns false if the entity has no tags", function () { expect(iD.Entity().hasInterestingTags()).to.equal(false); diff --git a/test/spec/util.js b/test/spec/util.js index de3fab735..d866a7b39 100644 --- a/test/spec/util.js +++ b/test/spec/util.js @@ -6,8 +6,8 @@ describe('iD.Util', function() { it('.tagText', function() { expect(iD.util.tagText({})).to.eql(''); - expect(iD.util.tagText({tags:{foo:'bar'}})).to.eql('foo: bar'); - expect(iD.util.tagText({tags:{foo:'bar',two:'three'}})).to.eql('foo: bar\ntwo: three'); + expect(iD.util.tagText({tags:{foo:'bar'}})).to.eql('foo=bar'); + expect(iD.util.tagText({tags:{foo:'bar',two:'three'}})).to.eql('foo=bar, two=three'); }); it('.stringQs', function() {