Early Warning Explorer -data.rcmrd.org/ewx-viewer REQUIREMENTS: (The following software versions are required for GeoEngine) *Java JRE, 1.8 or 1.7 *GeoServer, 2.11.0 *MySQL, 5.0 or later *Python, 2.7 (Installer included) *PIP, 1.6 or later (Installer included) *GDAL, 1.11.0 (Installer included) *Rasterstats, 0.3.3 (Installer included) *Numpy, 1.8.1 (Installer included) *Shapely, 1.3.2 (Installer included) *joblib (pip install package)
Using the GeoEngine_Dependencies_pkg.zip provided, right click and select ‘Extract All’ to your preferred directory. For the purposes of the rest of these instructions, %GeoEngine_Dependencies% refers to the location you extracted the files to.
Setting an environmental variable:
- Press the Windows key and type “run” and press “enter”.
- In the Run dialogue box, enter “SystemPropertiesAdvanced”.
- Click the “Environmental Variables…” button.
- Click “Edit” to edit an existing variable, click “New” to add a new variable.
Python Python version 2.7 is required and should be installed in a separate location if another version exists.
- Run the installer: %GeoEngine_Dependencies%\install\32-bit_installers\python-2.7.msi
- If python is installed to C: root then set Environmental Variables: PYTHON_HOME: C:\Python27 Add to PATH: %PYTHON_HOME%;%PYTHON_HOME%\Scripts\
pip
- Open an elevated command prompt (right click and select “Run as Administrator”)
- Navigate to the folder containing get-pip.py:
>cd %GeoEngine_Dependencies%\install - Run get-pip.py in the command prompt:
python get-pip.py
GDAL NOTE: While the installation of GDAL core is not necessary for EWX to run, it can be a very useful tool for troubleshooting/verifying files such as gdalinfo.
-
Install GDAL core using the installer provided: %GeoEngine_Dependencies%\install\gdal-201-1500-core.msi
-
Install Complete version.
-
Set the Environmental Variables: *Add to PATH: C:\Program Files\GDAL *GDAL_DATA: C:\Program Files\GDAL\gdalplugins *GDAL_DRIVER_PATH: C:\Program Files\GDAL\gdal-data
-
Check that GDAL is working by opening a command prompt and typing the command: gdalinfo --version If the command returns a version number, you installation is working.
-
REQUIRED: Install GDAL python plug-ins: %GeoEngine_Dependencies%\install\32-bit\installers\GDAL-1.11.0.win32-py2.7.exe
Numpy Install Numpy using the installer in %GeoEngine_Dependencies%\install\32-bit_installers\numpy-MKL-1.8.1.win32-py2.7.exe
Shapely Install Shapely using the installer in %GeoEngine_Dependencies%\install\32-bit_installers\Shapely-1.3.2.win32-py2.7.exe
Joblib Package Install joblib via pip - open a command prompt and enter the command
pip install joblib
GEOS
- Copy the file %GeoEngine_Dependencies%\install\32-bit_installers\geos_c.dll to C:\Python27\Lib\site-packages\shapely\DLLs
- If geos_c.dll already exists, rename the original and copy over the provided version.
- Set the Environmental Variable: GEOS_LIBRARY_PATH: C:\Python27\Lib\site-packages\shapely\DLLs\geos_c.dll
Rasterstats
- Open a command prompt and navigate to %GeoEngine_Dependencies%\install\32-bit_installers
>cd %GeoEngine_Dependencies%_pkg\install\32-bit_installers - Enter the command pip install rasterstats-0.3.3.tar.gz NOTE: Using the provided rasterstats tar gives an SSL warning - this is normal.
- Copy the entire %GeoEngine_Dependencies%\python folder to a location of your choice (we recommend C:\EWX\python_scripts).
- Navigate to C:\Python27\Lib\site-packages\rasterstats using the Windows file explorer.
- Rename the existing main.py file to main.py-org.
- Copy the main.py provided in the ‘python_scripts’ folder to the rasterstats directory.
- Test Python setup by opening a command prompt and navigating to where you placed rasterstat_test.py (e.g., C:\EWX\python_scripts) and run the command python rasterstat_test.py > rasterstat_test_results.txt to verify that it is working. NOTE: Use the full path to Python2.7 if you have another version installed.
- You will receive the following warning: C:\Python27\lib\site-packages\numpy\ma\core.py:3847: UserWarning: Warning: converting a masked element to nan. warnings.warn("Warning: converting a masked element to nan.") This is expected behavior.
- Compare the two files: rasterstat_test_results.txt & rasterstat_test_results_compare.txt.
- If they compare well, the Python setup is a success!
Java Runtime Environment
- Run %GeoEngine_Dependencies%\install\jre-8u111-windows-x64.exe
- Set the Environmental Variable: JAVA_HOME: C:\Program Files\Java\jre1.8.0_111
GeoServer
- Create a geoserver directory (we recommend C:\EWX\geoserver).
- Extract the files in %GeoEngine_Dependencies%\install\geoserver-2.11.0-bin.zip to C:\EWX\geoserver.
- Copy the contents of %GeoEngine_Dependencies%\data_dir to C:\EWX\geoserver\geoserver-2.11.0\data_dir
- Edit the web.xml file located in C:\EWX\geoserver\geoserver-2.11.0\webapps\geoserver\WEB-INF\
- Set the of GEOSERVER_DATA_DIR to the path C:\EWX\geoserver\geoserver-2.11.0\data_dir (the data_dir referenced in step 3).
Tomcat
- Run the Apache executable to install Apache: %GeoEngine_Dependencies%\install\apache-tomcat-8.5.8.exe
- We recommend you install tomcat in to the C:\EWX directory.
- Choose the minimum install and all defaults suggested by installation wizard (except for the install directory - see step 2).
- Allow the installer to start Apache Tomcat (keep the Start Tomcat box checked) after install.
- Make sure port 8080 is open in the Windows Firewall (if the port is not open, go to ControlPanel>System Security>Windows Firewall>Advanced Settings>inboundRules>New Rule, choose port, TCP 8080).
GeoServer (Part 2)
- Copy %GeoEngine_Dependencies%\geoserver\geoserver.xml to C:\EWX\tomcat\conf\Catalina\localhost\
- If needed, modify the docBase path in geoserver.xml to point to the correct version of GeoServer. For example: C:\EWX\geoserver\geoserver-2.11.0\webapps\geoserver
- If tomcat is not running, open a command prompt and navigate to C:\EWX\tomcat\bin
cd C:\EWX\tomcat\bin
- Enter the command
catalina.bat start
- The output will look something like the example below: C:\EWX\tomcat\bin> catalina.bat start Using CATALINA_BASE: "C:\EWX\tomcat" Using CATALINA_HOME: "C:\EWX\tomcat" Using CATALINA_TMPDIR: "C:\EWX\tomcat\temp" Using JRE_HOME: "C:\Program Files\Java\jre1.8.0_111" Using CLASSPATH: "C:\EWX\tomcat\bin\bootstrap.jar;C:\EWX\tomcat\bin\tomcat-juli.jar"
- Leave the resulting window open - tomcat will start up and keep running in this window.
- Open an internet browser and enter the URL http://localhost:8080/geoserver
- Login using the default username/password (admin, geoserver).
- CHANGE THE DEFAULT ADMIN PASSWORD by doing the following:
- On the left hand menu, click Users, Groups, Roles.
- Click the Users tab.
- Click on the admin Username.
- Enter new password.
- Click Save at the bottom of thepage.
MySQL
- Run the included MySQL install file: %GeoEngine_Dependencies%\install\mysql-installer-web-community-5.7.16.0.msi
- Select Server Only, click Next, then click Execute.
- Ready to Configure, Next.
- Choose Server Machine from drop down menu, keep the rest at default values.
- Create root password and add user “ewx”.
- Keep the next window at default values, as well as the window after that.
- To use mysql in a command prompt, add C:\Program Files\MySQL\MySQL Server 5.7\bin to the “Path” Environmental Variable.
- Open the MySQL command client (or a command prompt), enter root password. >mysql -u root -p
- Enter the commands: mysql> create schema ewx; mysql> use ewx; mysql> grant usage on . to ewx@localhost identified by 'SET_PASSWORD'; mysql> grant all privileges on ewx.* to ewx@localhost; mysql> flush privileges;
- Make sure port 3306 is open in the Windows Firewall (if the port is not open, go to ControlPanel-->System Security-->Windows Firewall-->Advanced Settings-->inboundRules-->New Rule, choose port, TCP 3306).