Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Updated README to be shorter. Additional documentation placed in BRANDING, DEVELOP, and FEATURES

Mike McGanncab17322eb22
diff --git a/BRANDING.md b/BRANDING.md
new file mode 100644
index 000000000..1eaf5f2b4
--- /dev/null
+++ b/BRANDING.md
@@ -0,0 +1,62 @@
+# Branding
+
+By default, the build process will:
+
+* Name the application "My 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]
+
+## Customizing
+
+To customize, copy the default branding directory to another directory
+and make changes there. For example:
+
+ cp -R etc/brand.default etc/brand.custom
+
+*Please Note*: Additional brand directories are in the ``.gitignore`` file
+so that you can make a separate repository for the customizations.
+
+Now edit the ``etc/brand.custom/brand/options.json`` file and make changes
+as necessary using the guidance below:
+
+* ``packageName``: Name used to create tar files, base directories and web
+roots (e.g, supermap)
+* ``officalName``: Name of the application when used in a formal setting
+(e.g, TLA's Super Map of the World)
+* ``longName``: Full, but not offical, name of the application (e.g. Super
+Map of the World)
+* ``shortName``: Abbreviated, short name of the application (e.g. Super Map)
+* ``version``: Version of the application suitible for display to an
+end user.
+* ``release``: Used to mark a new revision when the version number should
+not be changed.
+* ``support``: Email address that should be presented to the end user for
+support requests.
+
+The ``url`` and ``description`` fields are used for generating the
+documentation and don't need to be changed.
+
+To add a logo, replace the following file with an image that is 247 pixels by
+45 pixels:
+
+ etc/brand.custom/src/images/brand/wv-logo.png
+
+To create an "About" page, edit the following file:
+
+ etc/brand.custom/src/pages/brand/about.html
+
+## Rebuilding
+
+Inform the build process to use the "custom" brand directory with the
+following:
+
+ mkdir -p brand
+ echo '{"brand": "custom"}' > brand/brand.json
+
+Build again and the customizations should now be incldued:
+
+ grunt
+
+
+
diff --git a/DEVELOP.md b/DEVELOP.md
new file mode 100644
index 000000000..e3d116530
--- /dev/null
+++ b/DEVELOP.md
@@ -0,0 +1,147 @@
+## Development
+
+*Please Note*: There is litte to no documentation at ths time and any
+comments in the code may be out of date.
+
+### Web Server Configuration
+
+Worldview must be accessed via a web server to properly work. To generate
+a configuration file for use with Apache, execute the following:
+
+ grunt apache-config
+
+A ``.conf`` file will be placed in the ``dist`` directory. As root, copy
+this file to the Apache configuration directory:
+
+* Max OS X: /private/etc/apache2/other
+* RHEL/CentOS: /etc/httpd/conf.d
+
+Restart Apache:
+
+* Mac OS X: ``sudo apachectl restart``
+* RHEL/CentOS: ``sudo service httpd restart``
+
+Worldview should now be available at the following:
+
+* [http://localhost/worldview](http://localhost/worldview): Uses the source
+directory
+* [http://localhost/worldview-debug](http://localhost/worldview-debug):
+Uses the debug version (non-minified versions) found in the build directory.
+* [http://localhost/worldview-release](http://localhost/worldview-release):
+Uses the release version (minified versions) found in the build directory.
+* [http://localhost/worldview-doc](http://localhost/worldview-doc)
+
+
+### Minification of CSS and JavaScript files
+
+The build script needs to know which files to minify and the correct order used
+to concatenate. Anytime a CSS or JavaScript file is added. renamed, or removed,
+the following files must be updated:
+
+* ``etc/deploy/wv.css.json``
+* ``etc/deploy/wv.js.json``
+
+To ensure that references to the unminified value are removed in the production
+version, prefix all CSS or JavaScript link tags with
+
+ <!-- link.dev -->
+
+If there are some CSS or JavaScript files that must be available in
+non-concatenated form, add exceptions in the ``remove:source`` task in
+``Gruntfile.js``
+
+## Naming and Versioning
+
+The ``options.json`` file contains the name, version, and release number
+that is used when building the deployment packages. The name can be changed
+to allow side-by-side deployments of different branches. Executing:
+
+ grunt
+
+also creates distribution tarballs in the dist directory. Three "unversioned"
+files are generated:
+
+* ``dist/worldview.tar.bz2``
+* ``dist/worldview-debug.tar.bz2``
+* ``dist/worldview-doc.tar.bz2``
+
+Three "versioned" files are also generated in the form of:
+
+* ``dist/<name>-<version>-<release>.git<revision>.tar.bz2``
+
+Where ``name``, ``version``, ``release`` are the values found in the
+``package.json`` file and ``revision`` is the value from:
+
+ git rev-parse --short HEAD
+
+The ``options.json`` file in the repository root is copied from the
+active brand directory. To make changes, edit the official copy in the
+brand directory.
+
+
+## Grunt Targets
+
+These additional grunt targets are available.
+
+### Branding
+
+Any changes to the brading directories need to be applied to the source
+tree to take effect:
+
+ grunt brand
+
+
+### Configuration
+
+The Worldivew configuration file is generated by concatenating all files
+in ``conf/web``
+
+To regenerate the master configuration file in the source tree after making
+an edit, issue the following command:
+
+ grunt config
+
+
+### Linting
+
+Check for common errors in the JavaScript and CSS files with:
+
+ grunt lint
+
+
+### Documentation
+
+Documentation can be built separately with:
+
+ grunt doc
+
+### Unit Tests
+
+Run unit test with the following:
+
+ grunt test
+
+This uses BusterJS with PhantomJS for headless browser testing. To test in an
+actual browser which is quicker, install the Buster command line tools
+with:
+
+ sudo npm install --global buster-cli
+
+For static testing like QUnit, run the following and navigate the web browser
+to the address shown:
+
+ buster-static
+
+For browser capturing, run the following and navigate the web browser to
+the address shown:
+
+ buster-server
+
+
+### RPM
+
+To create an RPM on CentOS 6, issue the following:
+
+ grunt rpm
+
+Built RPMs will be found in the ``dist`` directory.
diff --git a/FEATURES.md b/FEATURES.md
new file mode 100644
index 000000000..12c681fdb
--- /dev/null
+++ b/FEATURES.md
@@ -0,0 +1,41 @@
+# Optional Features
+
+These features are not enabled by default. See each section below on how
+to enable the feature if desired.
+
+## Data Download
+
+The data download feature requires a CGI script to execute queries to ECHO
+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 ``conf/web/brand/features.json`` file in the active brand
+directory and change to:
+
+ "dataDownload": 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.
+
+## URL Shortening
+
+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
+serivce. Once you have obtained a key, copy ``conf/bitly_config.sample.py`` to
+``conf/bity_config.py``, edit the file, and fill in the proper values.
+
+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 ``conf/web/brand/features.json`` file in the active brand
+directory 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.
+
+
diff --git a/README.md b/README.md
index 65b9cea7b..dc96c7f59 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,8 @@
# [Worldview](https://earthdata.nasa.gov/worldview)
+Visit Worldview at
+[https://earthdata.nasa.gov/worldview](https://earthdata.nasa.gov/worldview)
+
## About
This tool from [NASA's](http://nasa.gov) [EOSDIS](https://earthdata.nasa.gov)
@@ -21,6 +24,7 @@ several other clients. We encourage interested developers to build their own
clients or integrate NASA imagery into their existing ones using these
services.
+
## License
This code was originally developed at NASA/Goddard Space Flight Center for
@@ -35,217 +39,42 @@ Licensed under the [NASA Open Source Agreement, Version 1.3](LICENSE.md).
## Building
-The toolchain assumes a Mac OS X or Linux environment.
-
-
-### [Release Notes](http://localhost/worldview/pages/release_notes.html)
-A full history of
-[release notes](http://localhost/worldview/pages/release_notes.html) are
-published in each version of Worldview
-
-## Development
-
-*Note*: These instructions have been tested on Mac OS X and Linux. Your
-mileage may vary on Windows.
-
-Clone a copy of this repository and change to the ``worldview`` directory.
-
-If you will be pushing commits back to the repository, ensure that your name
-and email address have been properly configured with git:
-
- git config user.name "My Name"
- git config user.email "<[email protected]>"
-
-Large commits may cause problems when using https. Issue the following
-command to increase the size of the buffer used:
-
- git config http.postBuffer 524288000
-
-
-### Web Server Configuration
-
-Worldview must be accessed via a web server to properly work.
-
-#### Via Apache
-
-* Mac OS X: In System Preferences under Sharing, check the Web Sharing item.
-
-Create the following file:
-
-* Mac OS X: ``/private/etc/apache2/other/worldview-dev.conf``
-* RHEL/CentOS: ``/etc/httpd/conf.d/worldview-dev.conf``
-
-with the following contents. Replace ``$WORLDVIEW_HOME`` with the path to
-the Worldview repository:
-
- Alias /worldview $WORLDVIEW_HOME/src
- Alias /worldview-release $WORLDVIEW_HOME/build/worldview/web
- Alias /worldview-debug $WORLDVIEW_HOME/build/worldview-debug/web
- Alias /worldview-doc $WORLDVIEW_HOME/build/worldview-doc
-
- <Directory $WORLDVIEW_HOME>
- Options Indexes FollowSymLinks ExecCGI
- AllowOverride All
- Order allow,deny
- Allow from all
- </Directory>
-
-Restart Apache:
-
-* Mac OS X: ``sudo apachectl restart``
-* RHEL/CentOS: ``sudo service httpd restart``
-
-Worldview should now be available at the following:
-
-* [http://localhost/worldview](http://localhost/worldview)
-* [http://localhost/worldview-debug](http://localhost/worldview-debug)
-* [http://localhost/worldview-release](http://localhost/worldview-release)
-* [http://localhost/worldview-doc](http://localhost/worldview-doc)
-
-### bit.ly URL shortening
-
-The permalink feature allows shortening of the URL. This requires an API
-key from bit.ly. To configure, copy ``conf/bitly_config.sample.py`` to
-``conf/bity_config.py``, edit the file, and fill in the proper values.
-
-### Minification of CSS and JavaScript files
-
-The build script needs to know which files to minify and the correct order used
-to concatenate. Anytime a CSS or JavaScript file is added. renamed, or removed,
-the following files must be updated:
-
-* ``etc/deploy/wv.css.json``
-* ``etc/deploy/wv.js.json``
-
-To ensure that references to the unminified value are removed in the production
-version, prefix all CSS or JavaScript link tags with
-
- <!-- link.dev -->
-
-If there are some CSS or JavaScript files that must be available in
-non-concatenated form, add exceptions in the ``remove:source`` task in
-``Gruntfile.js``
-
-## Building
-
-To build Worldivew, the following packages are required:
-
-* [Node.js](http://nodejs.org/)
-* [Python](http://www.python.org) (at least version 2.6 which should already
-be installed on Mac OS X and Linux)
+*Please Note:* Worldivew is under active development. Features may be absent
+or broken until the next major release. The toolchain only works in a Mac OS X
+or a Linux environment at the moment.
-After installing Node.js, install [grunt](http://gruntjs.com/):
+Download and install [Node.js](http://nodejs.org/). Now install a
+global version of [grunt](http://gruntjs.com/):
sudo npm install --global grunt-cli
-In the ``worldview`` repository directory, install the packages required
-for building:
+Clone a copy of this repository and change to the ``worldview`` directory.
+Now install the packages required for building:
npm install
Some python libraries are required. Run the following script which will
-globally install virtualenv (requires root), and then installs the libraries
-in the python directory:
+install the necessary libraries in the python directory via virutalenv
+(If virtualenv is not yet installed, the script will attempt to globally
+install it via sudo):
./python_install
-To create a version that is ready to deployed to a web server, issue the
-following:
+Start the build with:
grunt
-The following web roots will be created:
-
-* ``build/worldview/web``: Production release that contains concatenated and
-minified JavaScript and CSS files
-* ``build/worldview-debug/web``: Development release with JavaScript and CSS
-intact for debugging.
-* ``build/worldview-doc``: Source code documentation
-
-## Naming and Versioning
-
-The ``package.json`` file contains the name, version, and release number
-that is used when building the deployment packages. The name can be changed
-to allow side-by-side deployments of different branches. Executing:
-
- grunt
-
-also creates distribution tarballs in the dist directory. Three "unversioned"
-files are generated:
-
-* ``dist/worldview.tar.bz2``
-* ``dist/worldview-debug.tar.bz2``
-* ``dist/worldview-doc.tar.bz2``
-
-Three "versioned" files are also generated in the form of:
-
-* ``dist/<name>-<version>-<release>.git<revision>.tar.bz2``
-
-Where ``name``, ``version``, ``release`` are the values found in the
-``package.json`` file and ``revision`` is the value from:
-
- git rev-parse --short HEAD
-
-
-## Grunt Targets
-
-These additional grunt targets are available.
-
-### Configuration
-
-The Worldivew configuration file is generated by concatenating all files
-in ``etc/config/config`` and filling in palette information found in
-``etc/config/act`` and ``etc/config/vrt``.
-
-To regenerate the master configuration file in the source tree after making
-an edit, issue the following command:
-
- grunt config
-
-### Linting
-
-Check for common errors in the JavaScript and CSS files with:
-
- grunt lint
-
-### Documentation
-
-Documentation can be built separately with:
-
- grunt doc
-
-### Unit Tests
-
-Run unit test with the following:
-
- grunt test
-
-This uses BusterJS with PhantomJS for headless browser testing. To test in an
-actual browser which is quicker, install the Buster command line tools
-with:
-
- sudo npm install --global buster-cli
-
-For static testing like QUnit, run the following and navigate the web browser
-to the address shown:
-
- buster-static
-
-For browser capturing, run the following and navigate the web browser to
-the address shown:
-
- buster-server
-
-
-### RPM
-
-To create an RPM on CentOS 6, issue the following:
-
- grunt rpm
+The ``dist`` directory now contains a ``worldview.tar.bz2`` file which
+can be uploaded and unpacked to a web server.
-Built RPMs will be found in the ``dist`` directory.
+## Other Information
+* [Branding](BRANDING.md)
+* [Optional Features](FEATURES.md)
+* [Development Notes](DEVELOP.md)
+* [Third-Party Library Use](THIRD_PARTY.md)
+* [Release Notes](RELEASE_NOTES.md)
## Contact