-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
This is where we'll drop the installation instructions and links to the code
MacOS Instructions Installation & Setup
1/ Install MacPorts: https://www.macports.org/install.php
2/ Check to see what version of Java is installed. You need java version 1.8: Drive Download Link
Checking the Java Version In Terminal
dhcp-40-200:Documents ferrini$ java -versionjava version "1.8.0_201" Java(TM) SE Runtime Environment (build 1.8.0_201-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
3/ Install xquartz: http://www.xquartz.org
4/ Download and unzip the most recent MBSystem Release
Update macports
sudo port -v selfupdate
5/ Install gawk:
sudo port install gawk
6/ Install readlink:
sudo port install coreutils
7/ Install gdal:
sudo port install gdal
8/ Install php:
sudo port install php
9/ Installing MBSystem Prerequisites
9.1/ Update and install prerequisites
sudo port install gmt6 fftw-3 mesa libGLU openmotif xorg opencv4 pkgconfig
9.2/ List python packages and install the most recent one, here it was python312
port select --list python
python27
python311
python312
sudo port install python312
sudo port select --set python python312
sudo port select --set python3 python312
9.3/ Install the most recent Python imaging library Pillow
sudo port install py312-Pillow
10/ Installing MBSystem
10.1/ Move the MB-System Package. Note, our package is called MB-System-5.8.2beta08, yours may be a different version.
cd ~/usr/local/src
sudo mv ~/Downloads/MB-System-5.8.2beta08 .
cd MB-System-5.8.2beta08
10.2/ Execute Cmake Build System in your MB-System directory
mkdir build
cd build
cmake ..
sudo make
sudo make install
IF this doesn't work for you, follow the instructions on the MBARI MBSystem webpage, here.
10.3/ Finally make and install MBSystem
sudo make
sudo make install
Installing the GMRT-Tiler Package
Type bash into your terminal window and press enter
bash
11/ Download GMRTTiling Bundle to your machine and uncompress in a known location which will serve as your working directory. We usually recommend moving it to your home directory e.g. "Users/username"
Download GMRT Tiler Package via Google Drive
12/Setting Paths
12.1/ Make sure the path to the GMRTTool/bin folder is in your path E.g. use sudo vi /etc/paths to edit the /etc/paths file and add the path
sudo vi /etc/paths
Using vi: Press the
ikey to insert,esckey to exit insert, and:wqto save and quit out of vi
Your paths should look like this with the /Users/username/GMRTTiling replaced with the location of your GMRTTiling package
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Users/username/GMRTTiling/bin
12.2/ Set up your .bashrc and .bash_profile files with the correct paths by executing the following
echo 'export PATH=~/bin:~/GMRTTiling/bin:~/.local/bin:$PATH' >> ~/.bashrc
echo 'export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_341.jdk/Contents/Home' >> ~/.bashrc
echo 'PATH=$PATH:$HOME/.local/bin:$HOME/bin:$JAVA_HOME/bin' >> ~/.bash_profile
echo 'source ~/.bashrc' >> ~/.bash_profile
13/ Install homebrew and php
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install php
For detailed instructions on how to execute the code, see: GMRTTiling: How-to
GMRT_preproc issues:
Can not fine GMRT_preproc error: Confirm you are in bash
username@MacBook-Pro TestCruise % bash
bash-3.2$
Run php -v
bash-3.2$ php -v
PHP 8.3.7 (cli) (built: May 7 2024 16:35:26) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.7, Copyright (c) Zend Technologies
with Zend OPcache v8.3.7, Copyright (c), by Zend Technologies
If instead of the above you get Segmentation Fault, your php is not installed in the proper location.
Java error: Confirm the version of java you’re using. ($ java -version). Should be version 1.8 as noted above.
Check preproc.log and confirm where java is being pulled from when creating grids.
Error: java.io.IOException: Cannot run program “/Library/Internet”: error=2, No such file or directory Should be from somewhere like this: /Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home/jre/bin/java Check which versions of java are installed: /usr/libexec/java_home -V Matching Java Virtual Machines (3): 14 (x86_64) "Oracle Corporation" - "Java SE 14" /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home 1.8.321.07 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home 1.8.0_321 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home
The java path with /Library/Internet Will cause preproc to fail. Do not use this one. Make sure you’re using bash shell (enter bash into terminal window). Update the .bashrc and .bash_profile to insert the new paths.
echo 'export PATH=~/bin:~/GMRTTiling/bin:~/.local/bin:$PATH' >> ~/.bashrc
echo 'export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_341.jdk/Contents/Home' >> ~/.bashrc
echo 'PATH=$PATH:$HOME/.local/bin:$HOME/bin:$JAVA_HOME/bin' >> ~/.bash_profile
echo 'source ~/.bashrc' >> ~/.bash_profile
If necessary update the Config.php. Open the Config.php file to do this, but this should not need to be edited unless the paths are not where they are specified below. As an example to confirm use
which java;PATH TO GMT bin DIRECTORY GMTPATH = "/usr/bin" ;PATH TO JAVA bin DIRECTORY JAVAPATH = "/usr/bin" ;PATH TO MBSYSTEM bin DIRECTORY MBSYSTEMPATH = "/usr/local/bin" ;PATH TO tiles DIRECTORY ;DEFAULT IS GmrtTiling/tiles DIRECTORY ;Uncomment this line to set another location ;TILEROOT = "/path/to/tiles" ;PATH TO GeoMapApp JAR FILE ;DEFAULT IS GeoMappApp.jar PACKAGED WITH GmrtTiling ;Uncomment this line to set another GeoMapApp.jar ;GMAPATH = "/path/to/GeoMapApp.jar"
WSL can be used instead of setting up a virtual machine. The WSL installation instructions were provided by Paul Johnson.
1.) Install Windows Terminal - Microsoft Store (If not already installed)
2.) Install Distro with Powershell Terminal
wsl --install
wsl --update
wsl --list --online
wsl --install -d Ubuntu-22.04
Restart your computer
3.) Startup Terminal (might need to select Ubuntu 20.04 LTS as it will default to Powershell)
username: drennon
password: yourpassword
4.) Update Ubuntu
sudo apt update
sudo apt upgrade
5.) Add the unstable branch of the ubuntu gis repository
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt upgrade
6.) Install MB-System & GMT Packages
sudo apt install libtirpc-dev netcdf-bin libnetcdf-dev libgdal-dev gmt libgmt6 libgmt-dev libproj-dev libfftw3-3 libfftw3-dev libmotif-dev xfonts-75dpi xfonts-base xfonts-100dpi libglu1-mesa-dev libopencv-dev cmake gfortran
sudo apt install libtirpc-dev \
netcdf-bin libnetcdf-dev libgdal-dev \
gmt libgmt6 libgmt-dev libproj-dev \
libfftw3-3 libfftw3-dev libmotif-dev \
xfonts-100dpi libglu1-mesa-dev \
libopencv-dev cmake gfortran`
7.) Install other useful packages
sudo apt install gdal-bin csvkit libalgorithms1 pktools python3-csvkit python3-gdal python3-rasterio rasterio postgresql postgresql-contrib postgresql-14-ogr-fdw tcsh gmt-gshhg gmt-gshhg-full gmt-gshhg-low
sudo apt install libx11-dev xorg-dev libmotif-common libsdl1.2-dev libsdl-image1.2-dev unzip x11-apps imagemagick gv dos2unix xmlstarlet python3-pip csh dateutils units gpsbabel python3-babel ipython3 xml-core bpytop csh
8.) Download mbsystem and install
cd /usr/local/src
sudo wget --no-check-certificate https://github.com/dwcaress/MB-System/archive/refs/tags/5.8.2beta13.tar.gz
sudo tar -xvzf MB-System-5.8.2beta13.tar.gz
cd MB-System-5.8.2beta13
sudo mkdir build
cd build
sudo cmake ..
sudo make
sudo make install
9.) Add info to .bashrc
cd ~
cp .bashrc .bashrc.bak
echo ' ' >> ~/.bashrc
echo '# Add LD_LIBRARY_PATH for MBsystem' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
echo ' ' >> ~/.bashrc
echo '# Add MBsystem to GMT' >> ~/.bashrc
echo 'gmt gmtset GMT_CUSTOM_LIBS /usr/local/lib/mbsystem.so' >> ~/.bashrc
echo ' ' >> ~/.bashrc
echo ' ' >> ~/.bashrc
echo '# Add some additional aliases' >> ~/.bashrc
echo 'alias .=ZZZpwdZZZ' >> ~/.bashrc
echo 'alias ..=ZZZcd ..ZZZ' >> ~/.bashrc
echo 'alias bin=ZZZcd ~/binZZZ' >> ~/.bashrc
echo 'alias cp=ZZZcp -iZZZ' >> ~/.bashrc
echo 'alias h=ZZZhistory | tail -20ZZZ' >> ~/.bashrc
echo 'alias more=ZZZlessZZZ' >> ~/.bashrc
echo 'alias open=ZZZdisplayZZZ' >> ~/.bashrc
echo 'alias sc=ZZZsource ~/.bashrcZZZ' >> ~/.bashrc
echo 'alias te=ZZZcode .ZZZ' >> ~/.bashrc
echo 'alias top=ZZZbpytopZZZ' >> ~/.bashrc
echo 'alias x=ZZZchmod u+xZZZ' >> ~/.bashrc
echo ' ' >> ~/.bashrc
echo '# Add additional locations to the path' >> ~/.bashrc
echo 'export PATH=~/bin:~/bin/GMRTTiling/bin:~/.local/bin:$PATH' >> ~/.bashrc
echo ' ' >> ~/.bashrc
sed "s/ZZZ/\'/g" ~/.bashrc > /tmp/tmpaa
mv /tmp/tmpaa ~/.bashrc
cd
mbdefaults -Dgv -Idisplay -V
mkdir bin
10.) Install Java 1.8 (NOTE - MUST INSTALL THIS VERSION)
sudo apt-get install openjdk-8-jdk
11.) Install PIP and PHP and GDOWN
sudo apt install pip
sudo apt install php
sudo apt install php-xml
pip install gdown
12.) Download GMRT Tiler Package into ~/bin in your WSL environment either directly from GDrive or using gdown and unzip
Download GMRT Tiler Package via Google Drive
Via gdown
/home/drennon/.local/bin/gdown https://drive.google.com/uc?id=13CHoGdh0bwczsApeor0oegwH5uYzLIcq
NOTE: My gdown command was not in my paths so I found it by entering the command which gdown and using that path
Uncompress the package
sudo tar -xvzf GMRTTiling_1.2.tgz
13.) Update Java Path in GMRTTiling.conf
cd ~/bin/GMRTTiling/bin
vi GmrtTiling.conf
Double check where you Java package is
dpkg -L openjdk-8-jdk
And update Java Path to wherever your java is. Mine is here:
;PATH TO JAVA bin DIRECTORY
JAVAPATH = "/usr/lib/jvm/java-8-openjdk-amd64n/bin"
Type :wq to save your changes and quit out of vi
If you are having permissions issues, appending sudo to the beginning of your command
sudo chmod +x 777 GmrtTiling.conf
14.) Download GeoMapApp
Where ever you would prefer, I have mine in my home directory cd wget the updated GeoMapApp.jar
wget https://app.geomapapp.org/MapApp/GeoMapApp.jar
Test Launch GeoMapApp
java -jar GeoMapApp.jar
(Mounting GMA@Sea Instructions to come)