Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

remove logic related to old-arctic projection #821

Benjamin King401b5849b22f
diff --git a/web/js/main.js b/web/js/main.js
index 650458b37..08ff87e68 100644
--- a/web/js/main.js
+++ b/web/js/main.js
@@ -80,7 +80,6 @@ import { linkUi } from './link/ui';
import { parse as projectionParser } from './projection/projection';
import { projectionModel } from './projection/model';
import { projectionUi } from './projection/ui';
-import { projectionChange } from './projection/change';
// Other
import { debugConfig, debugLayers } from './debug';
@@ -237,10 +236,6 @@ window.onload = () => {
// data download now needs it too.
models.link.load(state); // needs to be loaded twice
- if (config.features.arcticProjectionChange) {
- models.proj.change = projectionChange(models, config);
- }
-
elapsed('ui');
// Create widgets
ui.proj = projectionUi(models, config);
diff --git a/web/js/projection/change.js b/web/js/projection/change.js
index 976f4b572..567a7ee20 100644
--- a/web/js/projection/change.js
+++ b/web/js/projection/change.js
@@ -1,17 +1,9 @@
-import $ from 'jquery';
import util from '../util/util';
-import wvui from '../ui/ui';
export function projectionChange(models) {
- var PROJECTION_CHANGE_DATE = new Date(Date.UTC(2013, 5, 6));
- var EARLIEST_CHANGE_DATE = new Date(Date.UTC(2012, 11, 31));
- var DO_NOT_SHOW_AGAIN = 'arcticProjectionChangeNotification';
- var notified = false;
- var polarVisited = 0;
var self = {};
self.events = util.events();
- self.old = false;
self.crs = null;
self.epsg = null;
@@ -27,94 +19,16 @@ export function projectionChange(models) {
var update = function () {
var proj = models.proj.selected;
- self.old = false;
if (proj.id === 'arctic' || proj.id === 'antarctic') {
- polarVisited = polarVisited + 1;
- var day = models.date.selected.getTime();
- var change = PROJECTION_CHANGE_DATE.getTime();
- var earliest = EARLIEST_CHANGE_DATE.getTime();
- self.old = day < change && day > earliest;
- }
-
- if (proj.id === 'arctic' && self.old) {
- self.crs = 'EPSG:3995';
- self.epsg = 3995;
- } else {
- self.crs = proj.crs;
- self.epsg = proj.epsg;
}
+ self.crs = proj.crs;
+ self.epsg = proj.epsg;
};
var onChange = function () {
- var wasOld = self.old;
update();
self.events.trigger('select', self);
- if (polarVisited > 1 && wasOld !== self.old) {
- checkNotify();
- }
- };
-
- var checkNotify = function () {
- // If the flag cannot be stored in local storage, do not notify
- // the user which will constantly annoy them.
- if (!util.browser.localStorage) {
- return;
- }
- if (localStorage.getItem(DO_NOT_SHOW_AGAIN) === 'true') {
- return;
- }
- if (notified) {
- return;
- }
- notify();
- };
-
- var notify = function () {
- notified = true;
- var message = [
- 'From 2013-01-01 to 2013-06-05, imagery in the polar projections',
- ' are different than the other dates as follows:',
- '<br/><br/>',
- 'The <b>Arctic projection</b> is in Arctic Polar ',
- 'Stereographic (EPSG:3995, "Greenwich down") rather than NSIDC ',
- ' Polar Stereographic North (EPSG:3413, "Greenland down"). ',
- 'Coastlines and Graticule for this time range ',
- 'can be found in the Add Layer tab by searching for ',
- ' "EPSG:3995". Note that the image snapshot tool will not work ',
- 'for Arctic imagery during this time range.',
- '<br/><br/>' +
-
- 'The <b>Antarctic projection</b> is a sphere with radius of ',
- '6371007.181 meters during these dates rather than being ',
- 'projected onto the WGS84 ',
- ' ellipsoid. For all other dates, the projection is now the ',
- 'correct Antarctic Polar Stereographic (EPSG:3031). This change ',
- 'results in a shift of the imagery that ranges up to tens of ',
- 'kilometers, depending on the location.',
- '<br/><br/>',
-
- 'Imagery during this time range will be reprocessed during winter ',
- '2017-18 to be made consistent with all other imagery. In the ',
- 'meantime, imagery will continue to be back-processed to the ',
- 'start of the Terra and Aqua missions in 2000 and 2002, ',
- 'respectively.',
- '<br/><br/>',
-
- 'Thanks for your patience as we improve and expand our ',
- 'imagery archive.',
- '<br/><br/>',
-
- '<input id=\'arcticChangeNoticeDontShowAgain\' value=\'false\' ',
- 'type=\'checkbox\'>Do not show again'
- ].join('');
- wvui.notify(message, 'Notice', 400);
- var $check = $('#arcticChangeNoticeDontShowAgain');
- $check.on('click', function () {
- if ($check.is(':checked') && util.browser.localStorage) {
- localStorage.setItem(DO_NOT_SHOW_AGAIN, 'true');
- }
- });
};
init();