Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Earthdata Search modal documentation updated. Added animated GIF. Last remaining item for modal is option to disable. CSS completed.

Stephan Wlodarczyk53000305b2e1
diff --git a/web/css/smart-handoff.css b/web/css/smart-handoff.css
index 16ef9b6d5..12de19772 100644
--- a/web/css/smart-handoff.css
+++ b/web/css/smart-handoff.css
@@ -8,9 +8,16 @@
#smart-handoff-product-list {
color: white;
}
-#button-group {
+.button-group {
text-align: center;
}
+.button-group input[type="checkbox"] {
+ margin: 10px;
+}
+.button-group label {
+ vertical-align: top;
+ margin-top: 10px;
+}
#cancel-btn, #continue-btn {
width: 200px;
margin: 5px;
@@ -69,20 +76,38 @@
font-size: 12pt;
color: #DDD;
}
+#smart-handoff-about hr {
+ border-bottom: 1px solid #333;
+ margin-top: 15px;
+ margin-bottom: -10px;
+}
#about-section {
overflow-y: scroll;
- height: 175px;
+ height: 400px;
}
#about-section p {
color: #BBB;
margin-bottom: 10px;
margin-right: 5px;
}
-#about-heading {
- font-size: 9pt;
+.about-heading {
+ font-size: 9pt !important;
color: #e94d19;
margin: 25px 0 10px 0;
}
+#earth-data-gif {
+ padding-top: 10px;
+ display: block;
+ margin: 0 auto;
+ width: 92%;
+}
+#earth-data-caption {
+ font-style: italic;
+ margin: 20px;
+ padding-bottom: 25px;
+ width: 94%;
+ text-align: center;
+}
#layer-info {
text-align: center;
background: #535353;
@@ -99,19 +124,30 @@
}
#toggle-more-info {
margin-top: 25px;
- color: #777;
+ color: #7bf;
font-size: 12pt;
text-align: center;
- text-decoration: underline;
}
#toggle-more-info:hover {
- color: #e94d19;
+ color: #9df;
cursor: pointer;
- text-decoration: none;
+ text-decoration: underline;
+}
+#toggle-more-info h2 {
+ width: 100%;
+ text-align: center;
+ border-bottom: 1px solid #333;
+ line-height: 0.1em;
+ margin: 10px 0 20px;
+}
+
+#toggle-more-info h2 span {
+ background:#191a1b;
+ padding:0 15px;
}
/** Overrides the modal component styles */
-#transferring-to-earthdata-search .modal-content {
+#transferring-to-earthdata-search.modal-dialog .modal-body {
background: #191a1b !important;
border: 1px solid #444 !important;
}
diff --git a/web/images/earth-data-search-preview.gif b/web/images/earth-data-search-preview.gif
new file mode 100644
index 000000000..8c20feb85
Binary files /dev/null and b/web/images/earth-data-search-preview.gif differ
diff --git a/web/js/containers/sidebar/smart-handoff-modal.js b/web/js/containers/sidebar/smart-handoff-modal.js
index 6cd65ad39..749c4cce0 100644
--- a/web/js/containers/sidebar/smart-handoff-modal.js
+++ b/web/js/containers/sidebar/smart-handoff-modal.js
@@ -1,6 +1,7 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
+import moment from 'moment';
import Button from '../../components/util/button';
/**
@@ -9,10 +10,15 @@ import Button from '../../components/util/button';
* to NASA's Earthdata Search web tool that will proceed in fetching corresponding
* layer data and granule files that are available for download.
*/
-function SmartHandoffModal({ extentCoords, goToEarthDataSearch }) {
+function SmartHandoffModal({
+ selectedDate, selectedLayer, extentCoords, goToEarthDataSearch,
+}) {
// Hides Earthdata Search information by default
const [showMoreInfo, toggleInfo] = useState(false);
+ const { title, subtitle } = selectedLayer;
+ const date = moment.utc(selectedDate).format('YYYY MMM DD');
+
return (
<div>
@@ -30,39 +36,53 @@ function SmartHandoffModal({ extentCoords, goToEarthDataSearch }) {
{ showMoreInfo
&& (
<div id="smart-handoff-about">
- <h1 id="about-heading">About Earthdata Search</h1>
+ <hr />
+ <h1 className="about-heading">About Earthdata Search</h1>
<div id="about-section">
<p>
Earthdata Search provides the only means for data discovery, filtering, visualization, and
access across all of NASA Earth science data holdings. The current selected layer and the designated
- viewport region within Worldview will be transferred to Earthdata Search.
+ viewport region in Worldview will be used to derive data granules within Earthdata Search.
+ </p>
+
+ <img id="earth-data-gif" src="../../../images/earth-data-search-preview.gif" />
+ <p id="earth-data-caption">
+ Granules that are available to download will be listed in the white pull out menu. Each granule listed can be
+ downloaded individually or the entire set contained within the bounding box can be downloaded as a zip file.
</p>
+
<p>
- More information to be documented later... Earthdata Search provides the only means for data discovery, filtering, visualization, and
- access across all of NASA Earth science data holdings. The current selected layer and the designated
- viewport region within Worldview will be transferred to Earthdata Search.
+ To leverage the use of Earthdata Search, users must register at
+ {' '}
+ <a href="https://urs.earthdata.nasa.gov/home" target="_blank" rel="noopener noreferrer">urs.earthdata.nasa.gov</a>
+ . The registration is provided free of charge. The user needs to set up a user ID, password, and provide
+ additional information, such as, user name, affiliation, country and a valid e-mail address, in order to complete
+ the registration process.
</p>
+
+ <h1 className="about-heading">Why must I register?</h1>
<p>
- More information to be documented later... Earthdata Search provides the only means for data discovery, filtering, visualization, and
- access across all of NASA Earth science data holdings. The current selected layer and the designated
- viewport region within Worldview will be transferred to Earthdata Search.
+ As noted on the Earthdata homepage, the Earthdata Login provides a single mechanism for user registration and profile
+ management for all EOSDIS system components (DAACs, Tools, Services). Your Earthdata login also helps the EOSDIS program
+ better understand the usage of EOSDIS services to improve user experience through customization of tools and improvement
+ of services. EOSDIS data are openly available to all and free of charge except where governed by international agreements.
</p>
</div>
</div>
)}
<div id="toggle-more-info" onClick={() => toggleInfo(!showMoreInfo)}>
- {showMoreInfo ? 'Hide Info' : 'Show More Info'}
+ <h2><span>{showMoreInfo ? 'Hide Info' : 'Show More Info'}</span></h2>
</div>
<div id="layer-info">
<h1> Selected layer to download: </h1>
- <p id="layer-name"> INSERT LAYER NAME </p>
- <p id="layer-mata-data"> INSERT LAYER META DATA </p>
+ <p id="layer-name">{`${title}`}</p>
+ <p id="layer-mata-data">{`${subtitle} (${date})`}</p>
</div>
- <div id="button-group">
+ <div className="button-group">
<Button
onClick={() => console.log('closing')}
id="cancel-btn"
@@ -77,6 +97,11 @@ function SmartHandoffModal({ extentCoords, goToEarthDataSearch }) {
/>
</div>
+ <div className="button-group">
+ <input name="show-earthdata-modal" type="checkbox" />
+ <label htmlFor="show-earthdata-modal">Do not show this message again.</label>
+ </div>
+
</div>
);
@@ -88,6 +113,8 @@ function SmartHandoffModal({ extentCoords, goToEarthDataSearch }) {
SmartHandoffModal.propTypes = {
extentCoords: PropTypes.object,
goToEarthDataSearch: PropTypes.func,
+ selectedDate: PropTypes.instanceOf(Date),
+ selectedLayer: PropTypes.object,
};
/**
diff --git a/web/js/containers/sidebar/smart-handoff.js b/web/js/containers/sidebar/smart-handoff.js
index dcd5def81..235ca7247 100644
--- a/web/js/containers/sidebar/smart-handoff.js
+++ b/web/js/containers/sidebar/smart-handoff.js
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import * as olProj from 'ol/proj';
import { debounce as lodashDebounce } from 'lodash';
+import moment from 'moment';
import SmartHandoffModal from './smart-handoff-modal';
import Button from '../../components/util/button';
import Crop from '../../components/util/image-crop';
@@ -11,6 +12,8 @@ import { getLayers } from '../../modules/layers/selectors';
import { imageUtilGetCoordsFromPixelValues } from '../../modules/image-download/util';
import { openCustomContent } from '../../modules/modal/actions';
import { changeCropBounds } from '../../modules/animation/actions';
+import getSelectedDate from '../../modules/date/selectors';
+
/**
* The Smart-Handoff components replaces the existing data download capability
@@ -29,7 +32,6 @@ class SmartHandoff extends Component {
const {
screenWidth,
screenHeight,
- selectedDate,
onBoundaryChange,
} = props;
@@ -40,7 +42,6 @@ class SmartHandoff extends Component {
x2: screenWidth / 2 + 100,
y2: screenHeight / 2 + 100,
},
- selectedDate,
selectedLayer: null,
};
@@ -84,13 +85,14 @@ class SmartHandoff extends Component {
activeLayers,
isActive,
showWarningModal,
+ selectedDate,
} = this.props;
/** Determine if data-download 'smart-handoff' tab is activated by user */
if (!isActive) return null;
/** Bounardies referencing the coordinates displayed around image crop */
- const { boundaries, selectedDate, selectedLayer } = this.state;
+ const { boundaries, selectedLayer } = this.state;
const {
x, y, x2, y2,
} = boundaries;
@@ -189,8 +191,14 @@ class SmartHandoff extends Component {
const openEarthDataSearch = (selectedDate, selectedLayer, extentCoords) => () => {
const { conceptId } = selectedLayer;
const { southWest, northEast } = extentCoords;
- const date = selectedDate.toISOString();
- const earthDataSearchURL = `https://search.earthdata.nasa.gov/search/granules?p=${conceptId}&pg[0][qt]=${date}&pg[0][dnf]=DAY&sb=${southWest},${northEast}&m=-30.59375!-210.9375!0!1!0!0,2`;
+
+ const startDate = `${moment.utc(selectedDate).format('YYYY-MM-DD')}T00:00:00.000Z`;
+ const endDate = `${moment.utc(selectedDate).format('YYYY-MM-DD')}T23:59:59.999Z`;
+
+ const dateRange = `${startDate},${endDate}`;
+
+ const earthDataSearchURL = `https://search.earthdata.nasa.gov/search/granules?p=${conceptId}&pg[0][qt]=${dateRange}&pg[0][dnf]=DAY&sb=${southWest},${northEast}&m=-30.59375!-210.9375!0!1!0!0,2`;
+
window.open(earthDataSearchURL, '_blank');
/* Example URL string
https://search.earthdata.nasa.gov/search/granules?
@@ -202,6 +210,14 @@ const openEarthDataSearch = (selectedDate, selectedLayer, extentCoords) => () =>
&ff=Customizable
&tl=1571168792!4!!
*/
+
+ // API Call to CMR
+
+ // Standard vs NRT
+
+ // Check DNF for ESD - dont put in query
+
+
};
/**
@@ -231,7 +247,7 @@ SmartHandoff.propTypes = {
const mapStateToProps = (state, ownProps) => {
const { tabTypes } = ownProps;
const {
- browser, layers, map, proj, date, compare, sidebar, boundaries,
+ browser, layers, map, proj, compare, sidebar, boundaries,
} = state;
const { screenWidth, screenHeight } = browser;
const { activeString } = compare;
@@ -244,7 +260,7 @@ const mapStateToProps = (state, ownProps) => {
proj: proj.selected,
screenWidth,
screenHeight,
- selectedDate: date.selected,
+ selectedDate: getSelectedDate(state),
tabTypes,
};
};
@@ -260,6 +276,8 @@ const mapDispatchToProps = (dispatch) => ({
headerText: 'Leaving Worldview',
bodyComponent: SmartHandoffModal,
bodyComponentProps: {
+ selectedDate,
+ selectedLayer,
extentCoords,
goToEarthDataSearch: openEarthDataSearch(selectedDate, selectedLayer, extentCoords),
},