From 9b6bc490ba091eef820a486d6da79dd89e369d43 Mon Sep 17 00:00:00 2001 From: Andrew Harvey Date: Sat, 10 Jul 2021 16:55:53 +1000 Subject: [PATCH 1/2] point iD to ohm-editor-layer-index instead of the original osm index --- RELEASING.md | 2 +- package.json | 2 +- scripts/update_imagery.js | 7 +------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 1f58fc4d164..4542f9fa0a4 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -15,7 +15,7 @@ on the iD project, and then create this file with contents like
 #### Update `develop` branch
 ```bash
 $  git checkout develop
-$  rm -rf node_modules/editor-layer-index/
+$  rm -rf node_modules/ohm-editor-layer-index/
 $  npm install
 $  npm run imagery
 $  npm run all
diff --git a/package.json b/package.json
index 5ba8611227a..56603f4e392 100644
--- a/package.json
+++ b/package.json
@@ -83,7 +83,7 @@
     "colors": "^1.1.2",
     "concat-files": "^0.1.1",
     "d3": "~5.16.0",
-    "editor-layer-index": "github:osmlab/editor-layer-index#gh-pages",
+    "ohm-editor-layer-index": "github:openhistoricalmap/ohm-editor-layer-index#dist",
     "eslint": "^7.1.0",
     "gaze": "^1.1.3",
     "glob": "^7.1.0",
diff --git a/scripts/update_imagery.js b/scripts/update_imagery.js
index 512c0dd2bc3..5acfba34327 100644
--- a/scripts/update_imagery.js
+++ b/scripts/update_imagery.js
@@ -1,6 +1,6 @@
 /* eslint-disable no-console */
 const fs = require('fs');
-let sources = require('editor-layer-index/imagery.json');
+let sources = require('ohm-editor-layer-index/imagery.json');
 const prettyStringify = require('json-stringify-pretty-compact');
 
 if (fs.existsSync('./data/manual_imagery.json')) {
@@ -10,10 +10,6 @@ if (fs.existsSync('./data/manual_imagery.json')) {
 
 let imagery = [];
 
-// ignore imagery more than 20 years old..
-let cutoffDate = new Date();
-cutoffDate.setFullYear(cutoffDate.getFullYear() - 20);
-
 
 const discard = {
   'osmbe': true,                        // 'OpenStreetMap (Belgian Style)'
@@ -115,7 +111,6 @@ sources.forEach(source => {
     endDate = new Date(source.end_date);
     isValid = !isNaN(endDate.getTime());
     if (isValid) {
-      if (endDate <= cutoffDate) return;  // too old
       im.endDate = endDate;
     }
   }

From 8bd4495fc9d9012e91bab4ffdca721aa11f3b68d Mon Sep 17 00:00:00 2001
From: Andrew Harvey 
Date: Sat, 10 Jul 2021 17:02:09 +1000
Subject: [PATCH 2/2] ohm-editor-layer-index

---
 FAQ.md                | 2 +-
 README.md             | 2 +-
 scripts/build_data.js | 2 +-
 scripts/deploy.sh     | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/FAQ.md b/FAQ.md
index b1351ae825a..c747d4e4710 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -15,7 +15,7 @@ To report an issue with missing or cloudy imagery:
 * _For Bing Satellite layer:_ Open the location in [Bing Maps](https://www.bing.com/maps), click the "Feedback" button and choose "Report a map problem" option.
 * _For Esri World Imagery:_ You can open a new issue using the [Imagery Map Feedback tool](https://www.arcgis.com/home/item.html?id=ebdfa4146680410bb952c7d532ea5407).
 
-iD's list of available background imagery sources come from the [editor-layer-index](https://github.com/osmlab/editor-layer-index)
+iD's list of available background imagery sources come from the [ohm-editor-layer-index](https://github.com/openhistoricalmap/ohm-editor-layer-index)
 project.  If you know of a more recent imagery source that is licensed for this use,
 please open a request there with the link and license details.
 
diff --git a/README.md b/README.md
index fd08e8d0fe3..f87bf0b3c5d 100644
--- a/README.md
+++ b/README.md
@@ -85,7 +85,7 @@ iD also bundles portions of the following open source software.
 
 * [D3.js (BSD-3-Clause)](https://github.com/d3/d3)
 * [CLDR (Unicode Consortium Terms of Use)](https://github.com/unicode-cldr/cldr-json)
-* [editor-layer-index (CC-BY-SA 3.0)](https://github.com/osmlab/editor-layer-index)
+* [ohm-editor-layer-index (CC-BY-SA 3.0)](https://github.com/openhistoricalmap/ohm-editor-layer-index)
 * [Font Awesome (CC-BY 4.0)](https://fontawesome.com/license)
 * [Maki (CC0 1.0)](https://github.com/mapbox/maki)
 * [Mapillary JS (MIT)](https://github.com/mapillary/mapillary-js)
diff --git a/scripts/build_data.js b/scripts/build_data.js
index 3a91002fc09..e35fc2adcc0 100644
--- a/scripts/build_data.js
+++ b/scripts/build_data.js
@@ -797,7 +797,7 @@ function translationsToYAML(translations) {
 
 function writeEnJson(tstrings) {
   const readCoreYaml = fs.readFileSync('data/core.yaml', 'utf8');
-  const readImagery = fs.readFileSync('node_modules/editor-layer-index/i18n/en.yaml', 'utf8');
+  const readImagery = fs.readFileSync('node_modules/ohm-editor-layer-index/i18n/en.yaml', 'utf8');
   const readCommunity = fs.readFileSync('node_modules/osm-community-index/i18n/en.yaml', 'utf8');
   const readManualImagery = fs.readFileSync('data/manual_imagery.json', 'utf8');
 
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
index d4f68fe84bb..f88d8833746 100755
--- a/scripts/deploy.sh
+++ b/scripts/deploy.sh
@@ -30,9 +30,9 @@ if [[ "${rev}" != "${orig}" ]] ; then
 fi
 
 # pull latest imagery
-rm -rf node_modules/editor-layer-index/
-git clone https://github.com/osmlab/editor-layer-index.git node_modules/editor-layer-index > /dev/null 2>&1
-rm -rf node_modules/editor-layer-index/.git/
+rm -rf node_modules/ohm-editor-layer-index/
+git clone https://github.com/openhistoricalmap/ohm-editor-layer-index.git node_modules/ohm-editor-layer-index > /dev/null 2>&1
+rm -rf node_modules/ohm-editor-layer-index/.git/
 
 # build everything
 npm run imagery