Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Clean up documentation

Jo Spraguecf9b8a0d5cd5
diff --git a/README.md b/README.md
index 7ca65e2c6..01c38f37b 100644
--- a/README.md
+++ b/README.md
@@ -32,84 +32,54 @@ to see where we're going or follow our [blog](https://wiki.earthdata.nasa.gov/pa
to find out the latest features and imagery available!
-## Installation
+## Install
-These instructions install a development version of Worldview using [Node.js](https://nodejs.org/)
-to serve the app locally. If you prefer to use Apache, follow the directions in [Setup Using Apache](doc/apache_setup.md).
+```bash
+git clone https://github.com/nasa-gibs/worldview.git
+cd worldview
+npm install
+```
-*Note:* This has been demonstrated to work on Windows 7 and 10 (as tested with [mingw-w64](http://mingw-w64.org/)), Mac OS X, and Ubuntu.
+### Dependencies
-Prerequisites:
-- [Node.js](https://nodejs.org/)
- - *Note to Ubuntu users:* After installing Node.js, ensure that it is available as `node` on the command line. If not, [see here](https://github.com/nasa-gibs/worldview/issues/249#issuecomment-302172817) for more information.
- - A later version of Node (>v6) is required and is not available on some distributions. To make sure you have a later version, [visit the Node download page](https://nodejs.org/en/download/)
+- [Node.js v8.8.1 or Later](https://nodejs.org/en/download/)
+ - *Note to Ubuntu users:* After installing Node.js, ensure that it is available as `node` on the command line. If not, [see here](https://github.com/nasa-gibs/worldview/issues/249#issuecomment-302172817) for more information.
- Windows users:
- Git Bash, mingw-w64 bash, or a similar shell must be used in order to run bash commands.
- - .NET Framework 2.0 or Visual Studio 2005 or newer installed with Visual C++ compilers.
- It is HIGHLY recommended you install the Windows Build Tools npm package to ensure the correct compilers have been installed.
- To install this package:
- ```
- # run in administrator privileged command prompt window
- npm install --global --production windows-build-tools
- ```
+ - .NET Framework 2.0 or Visual Studio 2005 or newer installed with Visual C++ compilers.
+ It is HIGHLY recommended you install the Windows Build Tools npm package to ensure the correct compilers have been installed. To install this package:
+ ```
+ # run in administrator privileged command prompt window
+ npm install --global --production windows-build-tools
+ ```
- Python 2.7.x (included with Windows Build Tools)
- - Python path added to Windows environmental variables (to use within cmd.exe and powershell)
- To add environmental variables:
+ - Python path added to Windows path variable (to use within cmd.exe and powershell). To edit this:
- Right-click the Windows icon in bottom-left corner of the screen.
- Click System, click Advanced System Settings, click Environmental Variables.
- Highlight the Path row and click edit.
- - Each path is seperated with a semicolon ";"
- - Add your python directory path here.\*
- \*Windows Build Tools includes python, the included python path is:
- `%USERPROFILE%\.windows-build-tools\python27`
- Otherwise the path is most likely:
- `C:\Python27`
-
-
-Clone this repository:
-
-```bash
-git clone https://github.com/nasa-gibs/worldview.git
-cd worldview
-```
-
-Install dependencies (NOTE for Windows users: omit the "sudo" part of the following commands as it [isn't available](https://stackoverflow.com/questions/22527668/sudo-command-not-found-on-cygwin)):
-```bash
-# install local version of grunt
-sudo npm install --global grunt-cli
-```
+ - Each path is separated with a semicolon, `;`.
+ - Add your python directory path here. (Windows Build Tools includes python, the included python path is: `%USERPROFILE%\.windows-build-tools\python27`. Otherwise the path is most likely: `C:\Python27`.
-```bash
-# install virtualenv to keep additional libraries installed in a local directory:
-sudo easy_install virtualenv==1.10.1
-```
+## Usage
-Run local node server:
```bash
-npm install
-grunt
+npm run build
npm start
```
-Worldview should be available at
-```bash
+Navigate to `http://localhost:3000`.
-http://localhost:3000
-```
-A node server will continue running until you end the session.
-You can end the session by pressing `control-C`
+To stop Worldview, press Control+C.
+### Custom Configuration
-### Additional Configuration Options
-
-The [Official EOSDIS configurations](https://github.com/nasa-gibs/worldview-options-eosdis) are installed by default in the `node_modules` directory.
-To use custom options, clone the template repository into a new `options` directory in the root using the following git command.
+The [Official EOSDIS configuration](https://github.com/nasa-gibs/worldview-options-eosdis) are used by default. To create a custom configuration, clone the configuration template into the `options/` directory and modify it;
```bash
-# A blank repository with only Corrected Reflectance and no branding
git clone https://github.com/nasa-gibs/worldview-options-template.git options
```
-Optionally, you can clone the official options and make changes as needed.
+
+Optionally, you can clone the official configuration and make changes as needed.
```bash
# or the Official EOSDIS configurations
git clone https://github.com/nasa-gibs/worldview-options-eosdis.git options
@@ -117,7 +87,7 @@ git clone https://github.com/nasa-gibs/worldview-options-eosdis.git options
## Other Information
-* [Alternate Installation using Apache](doc/apache_setup.md)
+* [Alternate Setup using Apache](doc/apache_setup.md)
* [Branding](doc/branding.md)
* [Optional Features](doc/features.md)
* [Configuration](doc/config.md)
diff --git a/doc/apache_setup.md b/doc/apache_setup.md
index 2dda11a68..845bd5816 100644
--- a/doc/apache_setup.md
+++ b/doc/apache_setup.md
@@ -1,106 +1,18 @@
-# Worldview installation using Apache
+# How to Setup Worldview Using Apache
-Download and install [Node.js](http://nodejs.org/) using the instructions on
-their site.
+> Note: Using Worldview with Apache is deprecated and will not be supported in the future. Is is recommended that you use Worldview with Node/[Express](https://expressjs.com/) instead. If you choose to proceed with Apache, choose one of the setup methods below.
-Clone this repository:
+## RPM Setup
-```bash
-git clone https://github.com/nasa-gibs/worldview.git
-cd worldview
-```
+* Run `bash ./tasks/buildAll.sh` to generate an `.rpm` file in `/build/rpm`.
+* Deploy the `.rpm` file to your server.
+* Note: you may have to modify `httpd.conf` and `worldview.spec` to match your environment before running these steps.
-Select one of the following configuration repositories:
+## Manual Setup
-```bash
-# Official EOSDIS configurations
-git clone https://github.com/nasa-gibs/worldview-options-eosdis.git options
-
-# Or a blank repository with only Corrected Reflectance and no branding
-git clone https://github.com/nasa-gibs/worldview-options-template.git options
-```
-
-Now install a global version of [grunt](http://gruntjs.com/) using the
-following command:
-
-```bash
-sudo npm install --global grunt-cli
-```
-
-Install the packages required for building:
-
-```bash
-npm install
-```
-
-Some python libraries are required. Install virtualenv to keep additional
-libraries installed in a local directory:
-
-```bash
-sudo easy_install virtualenv==1.10.1
-```
-
-Start the build with:
-
-```bash
-grunt
-```
-
-The ``dist`` directory now contains ``site`` tar files that can be
-can be uploaded and unpacked to a web server.
-
-## Mac OS X
-### Apache Server Configuration
-*These instructions work with OS X El Capitan. Directories and steps may differ with other OS X versions*
-
-Open httpd.conf
-```bash
-sudo vi /etc/apache2/httpd.conf
-```
-Make sure the following modules are enabled:
-```bash
-LoadModule expires_module libexec/mod_expires.so
-LoadModule php5_module modules/libphp5.so
-LoadModule deflate_module libexec/apache2/mod_deflate.so
-```
-For data download to function, CGI scripts must be executable. To do that, enable the mod_cgid module in the httpd.conf file.
-```bash
-LoadModule cgid_module modules/mod_cgid.so
-```
-
-### Example Apache User Configuration
-To access apache user config:
-```bash
-sudo vi /etc/apache2/users/Your-User-Name.conf
-```
-```bash
-Adjust the configuration:
-<Directory "/Users/Your-User-Name/Some-Dir">
- AllowOverride All
- Options Indexes MultiViews FollowSymLinks Includes ExecCGI
- Require all granted
-</Directory>
-```
-Restart Apache:
-```bash
-sudo apachectl restart
-```
-
-## Windows
-### Settings for a Worldview development environment
-Worldview may be setup on Windows with XAMPP. First install XAMPP, the default location is at C:\xampp. Clone the Worldview repo at C:\xampp\htdocs and then the configuration repo in Worldview.
-
-Edit the httpd.conf file at &lt;xampp root&gt;\apache\conf to uncomment:
-
-```bash
-"LoadModule expires_module modules/mod_expires.so"
-"LoadModule filter_module modules/mod_filter.so"
-"LoadModule deflate_module modules/mod_deflate.so"
-```
-
-Turn on xampp, and Worldview should be ready at "localhost/worldview/web"! If you encounter any code 500 errors, check the error log at &lt;xampp root&gt;\apache\logs
-
-## Troubleshooting
-If the steps above were not enough to get your environment set up, don't give up
-* Open apache logs to see if any obvious errors are being thrown
-* Open the console of your web browser to see if any recognizable errors are present
+* Follow [the instructions in the Readme](https://github.com/nasa-gibs/worldview/tree/module-loaders#installation) to install and build Worldview.
+* Either copy the contents of the `build/` directory or extract `dist/site-worldview.tar.bz2`) into the directory you want to serve from Apache.
+* Copy `httpd.conf` into the same directory, and update both `<Directory>` entries with the full path of that directory where `@WORLDVIEW@` is the name of the directory. Be sure to retain the `/web` and `/web/service` portions.
+* Comment out the first two `Alias` lines of the `httpd.conf` file with a `#`.
+* Restart Apache with `sudo apachectl restart`.
+* Note: You may have mixed results, and you may have to debug at this point.
diff --git a/doc/branding.md b/doc/branding.md
index 5cf302cbf..2d6f0bb07 100644
--- a/doc/branding.md
+++ b/doc/branding.md
@@ -1,50 +1,25 @@
# Branding
-By default, the build process will:
-
-* Name the application "Example Map"
-* Not provide a logo in the upper left hand corner
-* Contain an "About" page with only the version and name of the application.
-* Have a default support email address of [email protected]
+To add custom branding to Worldview you can [create a custom configuration](https://github.com/nasa-gibs/worldview#custom-configuration) and modify it;
## Customizing
-Customization is easy as modifying or changing some files in the ``options``
-directory.
-
-*Please Note*: The ``options`` directory is contained in the ``.gitignore`` file
-so that you can make a separate repository for the customizations.
-
-Edit the ``options/brand.json`` file and make changes as necessary using the
-guidance below:
+Update the following fields in `options/common/brand.json` with your custom branding;
-* ``packageName``: Name used to create tar files, base directories and web
-roots (e.g., supermap)
-* ``name``: Name of the application presented to the end users (e.g.,
-Super Map of the World)
-* ``email``: Email address that should be presented to the end user for
-support requests.
+* `packageName`: Application name used to create builds, (i.e. `worldview`).
+* `name`: Application name shown to end users (i.e. `EOSDIS Worldview`).
+* `email`: Email address for support requests.
-Naming can be more specific by omitting the ``name`` property and using
+Naming can be more specific by omitting the `name` field and using
the following instead:
-* ``officalName``: Name of the application when used in a formal setting
-(e.g, TLA's Super Map of the World)
-* ``longName``: Full, but not official, name of the application (e.g. Super
-Map of the World)
-* ``shortName``: Abbreviated, short name of the application (e.g. Super Map)
+* `officalName`: Full name of the application (i.e. `EOSDIS Worldview`).
+* `shortName`: Short name of the application (i.e. `Worldview`).
-To add a logo, replace the following file with an image that is 247 pixels by
-45 pixels:
+To add a logo, replace `options/common/brand/images/wv-logo.png` with an image that is 247x45 pixels.
- options/brand/images/wv-logo.png
-
-To create an "About" page, edit the following file:
-
- options/brands/pages/about.html
+To create an "About" page, edit `options/common/brand/pages/about.md`. You can also create other pages by creating other Markdown files in this directory.
## Rebuilding
-Build again and the customizations should now be included:
-
- grunt
+After making changes to a custom configuration, you'll need to run `npm run build` again to rebuild the app.
diff --git a/doc/config.md b/doc/config.md
index 7881554ce..a56eb3ff2 100644
--- a/doc/config.md
+++ b/doc/config.md
@@ -16,28 +16,28 @@ Information here is incomplete and can be flushed out on an as-needed basis.
All paths in the document are relative to the options repository root unless specified otherwise.
-After making any changes to the configuration, run ``npm run build:config`` from the command line to rebuild the configuration for use by the application.
+After making any changes to the configuration, run `npm run build:config` from the command line to rebuild the configuration for use by the application.
## New Layers
-Create a new JSON document in ``config/wv.json/layers`` named ``X.json`` where ``X`` is the layer identifier used in the WMTS or WMS call. This file can be placed in any subdirectory as needed for organizational purposes.
+Create a new JSON document in `config/wv.json/layers` named `X.json` where `X` is the layer identifier used in the WMTS or WMS API call. This file can be placed in any subdirectory as needed for organizational purposes.
The following is the minimum configuration needed for the Aerosol Optical Depth layer:
```json
{
- "layers": {
- "MODIS_Aqua_Aerosol": {
- "id": "MODIS_Aqua_Aerosol",
- "title": "Aerosol Optical Depth",
- "subtitle": "Aqua / MODIS",
- "group": "overlays"
- }
+ "layers": {
+ "MODIS_Aqua_Aerosol": {
+ "id": "MODIS_Aqua_Aerosol",
+ "title": "Aerosol Optical Depth",
+ "subtitle": "Aqua / MODIS",
+ "group": "overlays"
}
+ }
}
```
-All properties should be in an object keyed by the layer identifier used in the WMTS of WMS call.
+All properties should be in an object keyed by the layer identifier used in the WMTS of WMS API call.
### Required Properties
@@ -54,34 +54,33 @@ The following properties are required if this information is not available via t
- **format**: Image format type, either *image/png* or *image/jpeg*.
- **tileSize**: For WMS layers only, an array of pixel dimensions used to tile the requests. For example, *[512, 512]*
- **period**: Use *daily* for layers that have new content each day, otherwise use *static*.
-- **startDate**: For daily layers, the first day in ``YYYY-MM-DD`` format that data is available
+- **startDate**: For daily layers, the first day in `YYYY-MM-DD` format that data is available
- **inactive**: If the daily layer is no longer being produced, this should be present with a *true* value. Otherwise, this property can be omitted.
-- **endDate**: If the daily layer is no longer being produced, the last day in ``YYYY-MM-DD`` format that data was available.
+- **endDate**: If the daily layer is no longer being produced, the last day in `YYYY-MM-DD` format that data was available.
-A *projections* object must exist which contains an object for each projection supported by this layer. Projection information is keyed by the projection identifier (found in ``config/wv.json/projections``). Example:
+A *projections* object must exist which contains an object for each projection supported by this layer. Projection information is keyed by the projection identifier (found in `config/wv.json/projections`). Example:
```json
"projections": {
- "antarctic": {
- "source": "GIBS:antarctic",
- "matrixSet": "EPSG3031_250m"
- },
- "arctic": {
- "source": "GIBS:arctic",
- "matrixSet": "EPSG3413_250m"
- }
+ "antarctic": {
+ "source": "GIBS:antarctic",
+ "matrixSet": "EPSG3031_250m"
+ },
+ "arctic": {
+ "source": "GIBS:arctic",
+ "matrixSet": "EPSG3413_250m"
+ }
}
```
The projection parameters are as follows:
-- **source**: Identifier that indicates which endpoint contains this layer (see ``config/wv.json/sources.json``)
+- **source**: Identifier that indicates which endpoint contains this layer (see `config/wv.json/sources.json`)
- **matrixSet**: For WMTS layers only, the name of the matrix set as defined in the endpoint's GetCapabilities document.
### Layer Order
-The ``config/wv.json/layerOrder.json`` file must be updated to include the new layer identifier. This file determines the order that layers are displayed in the add layers tab.
-
+The `config/wv.json/layerOrder.json` file must be updated to include the new layer identifier. This file determines the order that layers are displayed in the add layers tab.
### Optional Properties
@@ -95,42 +94,40 @@ The ``config/wv.json/layerOrder.json`` file must be updated to include the new l
To display a color palette legend, a *palette* object should exist with the following properties:
- **id**: Identifier of the palette. This should match the name of the colormap file without the extension.
-- **recommended**: Array of custom palette identifiers that are recommended for use with this layer (see ``config/palettes-custom.json``). Example, *["orange_1", "red_1"]*
+- **recommended**: Array of custom palette identifiers that are recommended for use with this layer (see `config/palettes-custom.json`). Example, *["orange_1", "red_1"]*
### Full Example
```json
{
- "layers": {
- "AIRS_RelativeHumidity_400hPa_Day": {
- "id": "AIRS_RelativeHumidity_400hPa_Day",
- "title": "Relative Humidity (400 hPa, Day)",
- "subtitle": "Aqua / AIRS",
- "tags": "rh",
- "group": "overlays",
- "product": "AIRX2RET_DAY",
-
- "format": "image/png",
- "type": "wmts",
-
- "period": "daily",
- "startDate": "2013-07-16",
-
- "projections": {
- "geographic": {
- "source": "GIBS:geographic",
- "matrixSet": "EPSG4326_2km"
- }
- },
-
- "palette": {
- "id": "AIRS_RH400_A"
- }
+ "layers": {
+ "AIRS_RelativeHumidity_400hPa_Day": {
+ "id": "AIRS_RelativeHumidity_400hPa_Day",
+ "title": "Relative Humidity (400 hPa, Day)",
+ "subtitle": "Aqua / AIRS",
+ "tags": "rh",
+ "group": "overlays",
+ "product": "AIRX2RET_DAY",
+ "format": "image/png",
+ "type": "wmts",
+ "period": "daily",
+ "startDate": "2013-07-16",
+ "projections": {
+ "geographic": {
+ "source": "GIBS:geographic",
+ "matrixSet": "EPSG4326_2km"
}
+ },
+ "palette": {
+ "id": "AIRS_RH400_A"
+ }
}
+ }
}
```
+
## Adding Layers to Worldview and the Product Picker
+
New layers in the Global Imagery Browse Services (GIBS) can be added to Worldview via the options repository using the following instructions.
First, layers must be added to `config/wv.json/layers` and `config/wv.json/layerOrder.json`. Then they must be added to the `config/wv.json/measurements` and `config/wv.json/categories` folders so that they will be categorized in the Product Picker. Lastly, if the layers have descriptions these can be added in `config/metadata` and if they are available in the Common Metadata Repository (CMR), data download may be enabled for those layers.
@@ -154,7 +151,7 @@ First, layers must be added to `config/wv.json/layers` and `config/wv.json/layer
## New Map Sources
-Modify the JSON document, ``config/wv.json/sources.json``. There is a *sources* object that contains an object for each map source keyed by the source identifier. For layers that can be configured via a GIBS WMTS GetCapabilities document or for WMS layers, the only property required is:
+Modify the JSON document, `config/wv.json/sources.json`. There is a *sources* object that contains an object for each map source keyed by the source identifier. For layers that can be configured via a GIBS WMTS GetCapabilities document or for WMS layers, the only property required is:
- **url**: Either a string or array of strings where the map service is found.
@@ -166,31 +163,32 @@ For WMTS layers that cannot be configured with a GetCapabilities document, a *ma
- **tileSize**: Array of pixel dimensions for each tile. Example *[512, 512]*
### Full Example
+
```json
{
- "sources": {
- "GIBS:arctic": {
- "url": [
- "//map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",
- "//map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",
- "//map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"
- ],
- "matrixSets": {
- "EPSG3413_250m": {
- "id": "EPSG3413_250m",
- "maxResolution": 8192,
- "resolutions": [8192, 4096, 2048, 1024, 512],
- "tileSize": [512, 512]
- }
- }
+ "sources": {
+ "GIBS:arctic": {
+ "url": [
+ "//map1a.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",
+ "//map1b.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi",
+ "//map1c.vis.earthdata.nasa.gov/wmts-arctic/wmts.cgi"
+ ],
+ "matrixSets": {
+ "EPSG3413_250m": {
+ "id": "EPSG3413_250m",
+ "maxResolution": 8192,
+ "resolutions": [8192, 4096, 2048, 1024, 512],
+ "tileSize": [512, 512]
}
+ }
}
+ }
}
```
### GetCapabilities
-To automatically fetch configuration information from the GetCapabilities document, modify the ``config.json`` file and add an object to the *wv-options-fetch* object with the following properties:
+To automatically fetch configuration information from the GetCapabilities document, modify the `config.json` file and add an object to the *wv-options-fetch* object with the following properties:
- **from**: The URL to fetch the GetCapabilities document
- **to**: Name of the temporary file used to store the GetCapabilities document.
@@ -200,27 +198,27 @@ Now add an object to the *wv-options-wmts* object with the following properties:
- **source**: The identifier of the source that corresponds to this endpoint.
- **from**: The name of the temporary file used int he *wv-options-fetch* object.
- **to**: The name of the temporary output JSON file.
-- **projection**: The identifier of the projection used in this endpoint (see ``config/wv.json/projections``)
+- **projection**: The identifier of the projection used in this endpoint (see `config/wv.json/projections`)
- **maxResolution**: The resolution of first tile matrix entry.
### config.json Example
```json
{
- "wv-options-fetch": [
- {
- "from": "https://map1.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi?request=GetCapabilities",
- "to": "gibs-geographic.xml"
- },
- ],
- "wv-options-wmts": [
- {
- "source": "GIBS:geographic",
- "from": "gibs-geographic.xml",
- "to": "gibs-geographic.json",
- "projection": "geographic",
- "maxResolution": 0.5625
- }
- ]
+ "wv-options-fetch": [
+ {
+ "from": "https://map1.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi?request=GetCapabilities",
+ "to": "gibs-geographic.xml"
+ },
+ ],
+ "wv-options-wmts": [
+ {
+ "source": "GIBS:geographic",
+ "from": "gibs-geographic.xml",
+ "to": "gibs-geographic.json",
+ "projection": "geographic",
+ "maxResolution": 0.5625
+ }
+ ]
}
```
diff --git a/doc/data_download.md b/doc/data_download.md
index e17b2e1f5..85d181de0 100644
--- a/doc/data_download.md
+++ b/doc/data_download.md
@@ -1,6 +1,6 @@
# Data Download
-*Note*: This feature exclusively uses the Common Metadata Repository and is
+*Note*: This feature exclusively uses the Common Metadata Repository (CMR) and is
of no use for datasets stored elsewhere.
Each layer in Worldview can be mapped to a data product found in the CMR. In the layer configuration, use the *product* attribute and provide the identifier that will be used for the downloadable product.
@@ -10,25 +10,25 @@ example follows below:
```json
{
- "products": {
- "MYD04_L2": {
- "name": "MODIS/Aqua Aerosol 5-Min L2 Swath 10km",
- "handler": "AquaSwathMultiDay",
- "query": {
- "shortName": "MYD04_L2"
- },
- "nrt": {
- "by": "value",
- "field": "data_center",
- "value": "LANCEMODIS"
- },
- "urs": {
- "by": "value",
- "field": "data_center",
- "value": "LANCEMODIS"
- }
- }
+ "products": {
+ "MYD04_L2": {
+ "name": "MODIS/Aqua Aerosol 5-Min L2 Swath 10km",
+ "handler": "AquaSwathMultiDay",
+ "query": {
+ "shortName": "MYD04_L2"
+ },
+ "nrt": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
+ },
+ "urs": {
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
+ }
}
+ }
}
```
@@ -90,14 +90,14 @@ using the `MODISMix` handler, the query is specified in the following manner:
```json
"query": {
- "science": {
- "shortName": "MYD09GA",
- "dataCenterId": "LPDAAC_ECS"
- },
- "nrt": {
- "shortName": "MYD09",
- "dataCenterId": "LANCEMODIS"
- }
+ "science": {
+ "shortName": "MYD09GA",
+ "dataCenterId": "LPDAAC_ECS"
+ },
+ "nrt": {
+ "shortName": "MYD09",
+ "dataCenterId": "LANCEMODIS"
+ }
}
```
@@ -106,67 +106,67 @@ using the `MODISMix` handler, the query is specified in the following manner:
Each handler has a series of processors that may change or filter each result.
The result processors and configurations are as follows:
-##### AntiMeridianMulti
+### AntiMeridianMulti
If a granule splits the anti-meridian, this processor creates two polygons,
one on each side of the map. The constructor takes a `maxDistance` argument
-that specifies a distance, in degrees. If a line segemnt in the polygon is
+that specifies a distance, in degrees. If a line segment in the polygon is
greater than `maxDistance`, it is assumed to be crossing the anti-meridian.
-##### CollectPreferred
+### CollectPreferred
-If multiple granlues exist for a given acquisition time, this attempts to
+If multiple granules exist for a given acquisition time, this attempts to
group the granule as either near-real time or science quality. The granule
should already be tagged for NRT before using this processor. One of the
granules will be marked as preferred as indicated by the `prefer` variable
in the data download model. Use `PreferredFilter` to select only one of these.
-##### CollectVersions
+### CollectVersions
If multiple granules exist for a given acquisition time, this attempts to
group the granule by its version string. Use `VersionFilter` to select
only one of these.
-##### ConnectSwaths
+### ConnectSwaths
Uses the acquisition times to create connector lines to show the swath
ground track.
-##### DateTimeLabel
+### DateTimeLabel
Creates a label for this granule based on its acquisition date and time.
-##### Densify
+### Densify
Not used at the moment.
-##### DividePolygon
+### DividePolygon
-For polygons that cross the anti-meridian, normalize and create a mutlipolygon
+For polygons that cross the anti-meridian, normalize and create a mutli-polygon
with a polygon on each side. Uses code provided by the Earthdata Search client.
-##### ExtentFilter
+### ExtentFilter
Excludes granules that do not intersect the `extent` provided in the
constructor.
-##### GeometryFromCMR
+### GeometryFromCMR
Converts a CMR geometry to an OpenLayers 3 geometry.
-##### GeometryFromMODISGrid
+### GeometryFromMODISGrid
Creates a polygon footprint given a MODIS H and V tile number.
-##### MODISGridIndex
+### MODISGridIndex
Creates a index value by combining the MODIS H and V tile numbers.
-##### MODISGridLabel
+### MODISGridLabel
Creates a label for this granule based on the MODIS H and V tile numbers.
-##### OrbitFilter
+### OrbitFilter
Filter by ascending or descending orbit. Configure with `orbit` with the
following parameters:
@@ -180,27 +180,27 @@ Example:
```json
"orbit": {
- "type": "regex_group",
- "field": "producer_granule_id",
- "regex": ".*([AD])\\.hdf$",
- "match": "A"
+ "type": "regex_group",
+ "field": "producer_granule_id",
+ "regex": ".*([AD])\\.hdf$",
+ "match": "A"
}
```
-##### PreferredFilter
+### PreferredFilter
Only keeps near-real time granules if the `prefer` value passed in is `nrt`,
otherwise keeps science-quality granules if `science`.
-##### ProductLabel
+### ProductLabel
Sets the label of the granule to the `name` provided in the constructor.
-##### TagList
+### TagList
Forces the results to display in a dialog box list instead of on the map.
-##### TagNRT
+### TagNRT
Mark granules as near-real time depending on the following `nrt` configuration
parameters:
@@ -216,20 +216,20 @@ Example:
```json
"nrt": {
- "handler": "TerraSwathMultiDay",
- "by": "value",
- "field": "data_center",
- "value": "LANCEMODIS"
+ "handler": "TerraSwathMultiDay",
+ "by": "value",
+ "field": "data_center",
+ "value": "LANCEMODIS"
},
```
-##### TagProduct
+### TagProduct
Add a field to the granule result with the name of the product.
-##### TagURS
+### TagURS
-Mark granules as requring URS access depending on the following `urs`
+Mark granules as requiring URS access depending on the following `urs`
configuration parameters.
*FIXME*: Code an almost copy-and-paste from TagNRT, maybe consolidate this?
@@ -239,12 +239,12 @@ configuration parameters.
* `value`: Field value must equal this exactly or the constant to set as.
* `regex`: Field value must match this regular expression.
-##### TagVersion
+### TagVersion
Parse out the version field into a numeric value that can used for comparison
operations.
-##### TimeFilter
+### TimeFilter
Keep granules that meet the following values passed into the `spec`
constructor:
@@ -256,34 +256,21 @@ day.
* `maxDistance`: Any line segment in a polygon that exceeds this distance,
in degrees, is considered to have crossed the anti-meridian.
-##### TimeLabel
+### TimeLabel
Creates a label for this granule based on its acquisition time only. Times
that are not from the selected day are indicated with + or - day indicators.
-##### Transform
+### Transform
Convert the EPSG:4326 coordinates into the other projections required for
display.
-##### VersionFilter
+### VersionFilter
Given a set of granules with different versions, only select the latest.
-##### VersionFilterExact
+### VersionFilterExact
Only select granules with the exact version specified in the `version`
configuration item.
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/developing.md b/doc/developing.md
index c516db66b..264c3bbfb 100644
--- a/doc/developing.md
+++ b/doc/developing.md
@@ -38,16 +38,14 @@ This project uses `npm` as an interface to run build scripts and other tasks. Th
## Grunt tasks
-We're in the process of replacing our Grunt tasks with npm scripts, but here are the Grunt build scripts that are available. Note, these are poorly documented and you should use caution when running these scripts if you don't know what you're doing. Your mileage may vary when running scripts marked with a `*` by themselves.
+Grunt tasks are deprecated, but the following are still used under the hood and available to use if you know what you're doing;
`grunt`: This task is deprecated, and we don't recommend that you use it. Instead, use `npm run build` to generate a build. Under the hood, this is a shortcut for `grunt build && grunt config && grunt site`.
-`grunt config`* : Compiles branding and configuration options into an intermediate build directory and generates `tar` files of that directory.
+`grunt config`: Compiles branding and configuration options and puts the results in `build/`, `dist/`, and `web/`.
-`grunt build`* : Adds a git commit hash to source files, copies them into an intermediate build directory and generates `tar` files of that directory.
+`grunt build`: Copy assets to build directories and generate intermediate `tar` files.
-`grunt site`* : Combines the results of `grunt config` and `grunt build` into final `/build` and `/dist` directories and generates `tar` files of the final build.
+`grunt site`: Combines the results of `grunt config` and `grunt build` into final `/build` and `/dist` directories and generates `tar` files of the final build.
`grunt rpm-placeholders`: Replaces placeholder strings in rpm source files.
-
-`grunt apache-config`* : Moves `worldview.conf` to the `/dist` directory for deployment to an Apache server.
diff --git a/doc/features.md b/doc/features.md
index 304544a4c..1dfe5d5a5 100644
--- a/doc/features.md
+++ b/doc/features.md
@@ -1,44 +1,28 @@
# Optional Features
-These features are not enabled by default. See each section below on how
-to enable the feature if desired.
+These features require CGI scripts to execute on your server. In order for them
+to function, make sure your server is configured to allow the execution of
+CGI files. You can then enable these features in your configuration file;
## Data Download
-The data download feature requires a CGI script to execute queries to CMR
-on behalf of Worldview. For this reason, it is not enabled by default.
-If you understand the implications of this feature and wish to enable it,
-edit the ``options/features.json`` file and change to:
+This feature uses CGI scripts to query the CMR API on the server. To enable,
+open `options/common/features.json` and set `"dataDownload": true`.
- "dataDownload": true
+## URL Shortening
-Rebuild Worldview and the CGI script should be included in the
-``service`` directory. If your system administrator has disabled
-``.htaccess`` files, configure apache to allow the execution of this
-CGI script.
+This feature uses
+[bit.ly](http://bit.ly) to shorten links. Follow these steps to enable it;
-## URL Shortening
+* Edit `options/common/features.json` and set `"urlShortening": true`.
+* Obtain a login and API key from [bit.ly](http://bit.ly).
+* Create `build/options/bitly.json` with the following contents (replacing `your_login` and `your_key` with the appropriate values);
+
+ ```json
+ {
+ "login": "your_login",
+ "key": "your_key"
+ }
+ ```
-The URL shortening feature uses the service provided by
-[bit.ly](http://bit.ly). You will need to obtain an API key to use this
-service. Once you have obtained a key, create a ``options/bitly.json``
-file using the following as a template:
-
-```json
-{
- "login": "my_login",
- "key": "xh367ahdfjwna"
-}
-```
-
-This feature also requires a CGI script to execute queries to bit.ly
-on behalf of Worldview. For this reason, it is not enabled by default.
-If you understand the implications of this feature and wish to enable it,
-edit the ``options/features.json`` file and change to:
-
- "urlShortening": true
-
-Rebuild Worldview and the CGI script should be included in the
-``service`` directory. If your system administrator has disabled
-``.htaccess`` files, configure apache to allow the execution of this
-CGI script.
+ > Caution: Do not commit this file to a public repo, and make sure that the `build/options` directory is not publicly accessible on your web server since your API key should remain secret.
diff --git a/doc/testing.md b/doc/testing.md
index 060810151..5e51f4838 100644
--- a/doc/testing.md
+++ b/doc/testing.md
@@ -1,11 +1,16 @@
# Testing
-Note: Some of the parameters below may no longer be functional. Please contact us if you have any issues at [email protected].
-To run unit tests using Grunt, see the [Grunt Targets](https://github.com/nasa-gibs/worldview/blob/9781bcc3c177338bf3043f59c1ebe1a9d8ae4355/doc/developing.md#unit-tests) documentation
+To run unit tests, run `npm test`.
-Append the following parameters to the URL to test using mock data.
+End-to-end tests are also available with the following commands:
-## Permalinks
+`npm run e2e:chrome`
+`npm run e2e:firefox`
+`npm run browserstack`
+
+## Mocking Data
+
+Append the following parameters to the URL to test using mock data;
### External
@@ -205,10 +210,5 @@ Append the following parameters to the URL to test using mock data.
<td colspan="1">true</td>
<td colspan="1">If any value is specified, an error dialog will be shown on startup.</td>
</tr>
- <tr>
- <td colspan="1">webmerc</td>
- <td colspan="1"></td>
- <td colspan="1">If found in the query string, a menu item for Web Mercator becomes available.</td>
- </tr>
</tbody>
</table>