Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 INTRODUCTION
History of GloVis
Installation Guide Caveat
Installation First Steps
1
1
2
3
2 HARDWARE REQUIREMENTS
Java Applet
Web Pages
Ingest
Overview
4
4
4
5
5
6
6
6
6
7
7
8
8
9
10
11
12
ii
External Tools
Applet Tools
Ingest Processing Tools
Map Layer Tools
6 WRAPPING THINGS UP
Viewing Your StateView Website
Feedback of Code Changes/Bug Reporting
13
14
14
15
16
17
17
18
18
18
18
19
20
21
21
21
22
22
23
23
24
24
24
iii
25
25
26
27
28
28
28
28
29
9 DISCLAIMER
29
10 ACRONYMS
30
11 APPENDIX
A. Signing Your Java Applet
B. Address Search
32
33
35
iv
1. Introduction
History of GloVis
The Global Visualization Viewer (GloVis) application was originally conceptualized and prototyped
at the USGS National Center for EROS in response to a need to strive beyond the typical
metadata query capabilities of GLIS or EarthExplorer; to provide the additional infrastructure of a
visual remote sensed data search and order client. This client would be driven by visual queries,
versus the traditional metadata-driven searches of previous search and order tools. GloVis was
prototyped with Landsat 7 ETM+ data initially and was received positively by the USGS
AmericaView program customer. The USGS requirements were documented at that point and the
prototype began to take shape. The next two releases focused on code cleanup, and the GloVis
project was brought to official status.
Landsat 7 ETM+ data has become just the tip of the iceberg; many more remotely sensed data
collections have been added as the application has transitioned from prototype to official
development. Through the joint efforts of AmericaView and the NASA Distributed Active Archive
Center (DAAC), access to the ASTER Level-2 VNIR browse dataset was added next. As the
notoriety of the application increased, the tool was quickly adopted by users as a reliable search
and order interface, and is now widely used. Excitement surrounding the ability to quickly locate
and view browse imagery and easily select interesting scenes for ordering has led to requests for
many additional remote sensed datasets to be added to the tool. The ASTER Level-2 VNIR
browse were later replaced with Level-1B VNIR browse, and GloVis now contains those datasets
as well as ASTER TIR; Landsat 7 ETM+ SLC-off; Landsat 4-5 TM; Landsat 1-3 and 4-5 MSS;
Landsat Orthorectified ETM+, Pansharpened ETM+, TM and MSS; MRLC 2001 Terrain Corrected,
and 2001 Reflectance Adjusted collections; Earth Observing-1 (EO-1) ALI and Hyperion data;
NAPP and NHAP aerial photography; MODIS grid datasets; and the list of datasets keeps
growing.
The most recent addition is Landsat 8, released in 2013. Landsat 8 continues more than 40 years
of coverage of the earths land surfaces.
Introduction (cont)
2. Hardware Requirements
GloVis is actually split into several parts: the java applet that presents the data to the user along
with the web pages associated with the applet, and the ingest code to convert the imagery into the
format required for the applet. Each of these parts have separate requirements, as will be
described next.
Java Applet
On the user's side, GloVis requires any web browser with support for Java 8 or higher but the
most recent version is strongly recommended. To get plug-ins or add-ons for your browsers,
sometimes called the Java Runtime Environment (JRE), go to <http://java.com/> and select the
Free Java Download link.
On the developer's side, GloVis requires the Java SE Development Kit (JDK), which is available
from Oracle at <http://java.com/>.
Web Pages
Requires a web server to serve up the pages. At EROS, we run Apache on a Linux server. The
web pages have a few features in them that depend on Apache functionality and configuration
options. But it would probably be relatively easy to eliminate those and run it on any web server.
The size of the server depends on how many simultaneous users you expect at once.
Enough disk space to hold your data.
Ingest
The ingest software has only been run on Linux. But it should be fairly easy to adapt to nearly any
type of Unix without much (if any) work. However, you'd need to customize the ingest software for
your data.
Note that most states do not run the ingest code and instead download the processed browse
scenes associated with their data from the GloVis inventory. More information about this option is
available in Preparing for Installation: Application and Data Overview.
Overview
In general, many parts of the software build process assume it is running on some flavor of Unix.
Adapting it to work on a Windows box would require a lot of work. In a nutshell, the system
requirements for ingesting and serving web pages is any moderately sized PC running a version of
Linux. But it would take very little work to adapt it to some other flavor of Unix if you want.
A note about your network connection; if this is to be a publicly available web site, obviously the
better your connection the more your users will like it.
Once the source code archive file has been retrieved from the
distribution site to the desired system of installation, select a
location to decompress the source code.
The source code is now ready for customizing for your specific installation.
10
11
Set IMAGE_WIDTH and IMAGE_HEIGHT variables to the size of your state map image
Set the LEFT_LON, RIGHT_LON, TOP_LAT, BOTTOM_LAT variables to reflect the
geographic extents of the image (Note: for the US, the longitude values will be negative)
Set the MAP_IMAGE variable to the name of your image
Set the ENFORCE_GEOGRAPHIC_BUMPER variable to true to reflect the geographic
extents of the image.
If you want to overlay on your state image with boundaries (e.g. county boundaries), set
the BOUNDARY_IMAGE variable to the name of your boundary image file. This image
must be the same size as the map image and also must be in the geographic projection
and must be a transparent GIF to overlay the state map properly. Otherwise set
BOUNDARY_IMAGE= and USE_BOUNDARY_IMAGE to false
Update the Makefile in the glovis/web/ImgViewer directory
Add your image file name(s) to the appropriate macro in the file (e.g. under GIFS, JPGS,
or create a new one if necessary)
12
13
If you wish to use the linework files that are utilized by GloVis, you may download them from the
GloVis website by running a script distributed with the source code. This is explained further in
Building and Installation: Downloading Default Linework.
The default configuration distributed with the source code will not display linework upon starting the
GloVis application. Linework must be selectively turned on with application menus. To change the
initial display defaults:
Open the file glovis/web/ImgViewer/MapLayersConfig.java
Set each of the variables representing the linework map overlay items to either true or false to
have it appear (or not) upon starting the application.
14
Additional Modifications/Notes
There a number of additional changes you will surely need to make to the overall look of the web
pages and applet to identify the application as your states StateView website. You may want to
initially build and install the default pages, then review them to identify where additional updates
are needed. Keep a list of all the files you modify in the code and additional files you add to the
codebase (new images, etc); this will be handy if you ever wish to upgrade to a new GloVis
version. Some suggested additional information that you will likely want to change includes:
Create a custom header banner, image map, and footer for the homepage
(glovis/web/mainpage/index.shtml or glovis/web/includes/headerinclude.html,
header_glovisb2.html, footer.shtml)
Customize the navigation bars on the homepage
Trim the sensor list on the homepage to only contain the data you are distributing
Various Makefiles may need review and updates for your replacement files
Modify glovis/web/ImgViewer/Sensor.java to reference your local archive
Modify glovis/web/ImgViewer/GloVis.Properties according to your installed datasets
15
16
17
18
The (reduced resolution) browse image file (Level 0 for some datasets, Level 1 for others)
A <filename>.meta file that contains selected metadata for the scene
cont (next page)
19
20
21
External Tools
For the most part, installing a StateView website will not require the use of any external tools since
most of the ones GloVis uses are only needed for ingesting data.
Applet Tools:
There are two tools, though, that are needed to display the Landsat-7 ETM+ SLC-off browse scenes,
so everyone planning to distribute SLC-off data will need these. The libgd is available in the base
install of Red Hat and probably most other Linux distributions. Some care must be taken though, to
make sure the libgd and the Perl GD library you will also need are compatible. We are actually using
a fairly old version of Perl GD since Red Hat was shipping a relatively old version of libgd. If you
decide to use a different version of either of these tools, make sure it is compatible with the version of
the other tool you are using. (Make sure you setup your environment variables properly with the
glovis_env script before executing these installs.)
Perl GD module
Create a new directory to retrieve the module to (lets use perl_gd here)
Download the Perl GD module from CPAN.org at the following location:
<http://www.cpan.org/modules/by-module/GD/> or read the GD documentation at the
following location: <https://metacpan.org/pod/GD>
22
23
6. Wrapping Things Up
Viewing Your StateView Website
You now should have the applet and web pages for the application tailored, built, and installed; the
browse scene data for the scenes purchased by your state should be downloaded to your local
inventory; and the linework files should be copied to your local system, if you have chosen to
incorporate these into your StateView instance. With these steps complete, you now can type the
location of your website into a current generation browsers URL field and view your states
remotely sensed image data browse inventory with your new StateView application.
The homepage of the website is the glovis/web/index.shtml file. After installing the application, you
will need to use a web address similar to this to view your homepage:
http://www.<your_host.domain>/<stateview>/. You may wish to have your system administrator
setup an alias for your website so you can have an address more like this:
http://<stateview.your_host.domain>. Your administrator may have to add index.shtml to the list of
index files the web server looks for.
24
7. Upgrade Installs
Once you have your StateView website created and a new version of GloVis is released, it may be
a daunting task to upgrade your code. This task can be accomplished actually, if you follow the
proper steps. First, review the release notes for the new version and see if you are even interested
in incorporating the updates into your StateView instance. If you do wish to install the new version,
follow the instructions provided below.
Put all the patch files in a common location for ease of use
The remaining steps in Preparing for Installation, that you executed with your previous install, can
be replaced by simply applying your patch files to the files in the new source code. The basic
command to apply a patch is patch < path_to_patch/filename.patch (you have to be at the same
directory level to apply the patch as you were when you created it). Any conflicts with the patches
need to be resolved before moving on.
Any new files you created will need to by copied from your old source code to the appropriate
location in the new releases source code directory tree (new images, etc.).
25
Were basically going to start at Building and Installation: Build the Installation Directory Tree and
do the build and install the same as if this was a first-time install, but use a different location to
install the application at. When you source the glovis_env script, just provide a new location to
install this version of the application to (i.e. glovis_build_new).
When you have the code built and installed, you need to get your scene data and the linework
installed in this new location too. In most cases you can use the same data you already have for
each scene and for the linework. If you have your data directories located outside the install
directory structure and use symlinks to link it in, your links should already be made if you have
creating them worked into your build process correctly. If you keep the data directly under the
$(GV_HTML)/ImgViewer directory, you can just copy each entire data inventory structure from your
old install (e.g. cp R glovis_build/ImgViewer/l7 $(GV_HTML)/ImgViewer, assuming your
environment variables are setup for your new install still). Do this for each dataset you support as
well as for the linework.
Occasionally, metadata file contents and/or the browse imagery itself gets modified, so be careful
when reading the release notes to determine if you can use the same data files for each dataset
and the linework or if you will need to re-pull the any files from the GloVis server. If you do need to
re-pull any data, you can just re-execute the process to do this outlined in Building and Installation:
Downloading GloVis Browse Image Data and/or Building and Installation: Downloading Default
Linework to get the new data.
Typically, we will not upgrade to new versions of the external tools GloVis relies on, so you usually
will not have to update those, though you still will need to install the necessary external tools into
the new applications build directory tree, as you did previously, if you needed any of them.
26
Move your existing StateView build directory tree to a backup location (e.g. mv glovis_build
glovis_build_old) in case the new application is found to have problems, then you can just move
this back where it was until the new versions issues are resolved and you can re-release it.
Move the new version to the live location (e.g. mv glovis_build_new glovis_build)
As soon as you move your current version out of the way, move the new one in as quickly as
possible to minimize the time your site is unavailable.
27
Programming Information
Java:
http://java.com/
http://www.oracle.com/technetwork/java/javase/documentation/index.html
jQuery JavaScript library:
http://jquery.com
Oracle Tools for Java Platform Security (signing your Java applet):
http://docs.oracle.com/javase/8/docs/technotes/guides/security/SecurityToolsSummary.html
http://docs.oracle.com/javase/tutorial/deployment/jar/signing.html
http://java.com/en/download/help/appsecuritydialogs.xml
Perl Documentation:
http://perldoc.perl.org/
28
9. Disclaimer
The GloVis source code is provided "As Is", without a warranty or support of any kind. The
software is Government Off-The-Shelf (GOTS), public-domain; it is available to any government,
public, or private institution. Occasionally, limited support will be considered for agencies with
whom we have cooperative agreements or mutual goals.
29
10. Acronyms
ALI
ASTER
CSS
DAAC
EO-1
Earth Observing-1
EROS
ETM+
GIF
GloVis
GLIS
GOTS
Government Off-The-Shelf
JDK
JPEG
JRE
LDCM
MODIS
MRLC
MSS
Multispectral Scanner
30
Acronyms (cont)
NAPP
NASA
NDVI
NCSA
NHAP
OLI
POC
Point of Contact
SLC
Scan-Line Corrector
SSI
Server-Side Include
TIRS
TOC
Table of Contents
URL
US
USGS
VNIR
WRS
31
11. Appendix
A. Signing Your Java Applet
If you wish to sign your applet, we have provided some example code. Following are details of how
GloVis sets up the Java key, how to use it, and other factors you might want to consider.
Review the Java security tutorials on the Oracle documentation website if you need help
understanding Java security. The link is given in the Documentation and Support: Programming
Information section.
Here are the targets in a Makefile we use to build the Java key used to sign the applet:
# target to make a Java security key
javakey:
keytool -alias $(GV_JAVASEC_ALIAS) -storepass $(GV_JAVASEC_PASSWORD) \
-keypass $(GV_JAVASEC_PASSWORD) -genkeypair -keyalg RSA -sigalg MD5withRSA \
-keystore javakey -keysize 2048 -dname "$(GV_JAVASEC_NAME)"
# target to make a Java security certificate signing request (CSR) using a local file called csrFile
csr:
keytool -certreq -alias $(GV_JAVASEC_ALIAS) \
-storepass $(GV_JAVASEC_PASSWORD) -keystore javakey -file csrFile
# target to import the certificate from the Certificate Authority data
# from a local file called cert.cer into the key file
importcsr:
keytool -importcert -alias $(GV_JAVASEC_ALIAS) \
-storepass $(GV_JAVASEC_PASSWORD) -keystore javakey -file cert.cer
32
GV_JAVASEC_ALIAS
GV_JAVASEC_PASSW
ORD
GV_JAVASEC_NAME
GV_JAVASEC_KEYST
ORE
33
34
35