1. Install Anaconda (Miniconda) from: https://conda.io/miniconda.html.
- NOTE: If you are using a windows machine, you will need to open the anaconda terminal to execute the commands below.
2. Create and activate a conda environment:
conda create -n qgis_pyhat
conda activate qgis_pyhat
- NOTE: If you want to restart installation, you should remove the
qgis_pyhat
environment and create a new one.conda deactivate
conda env remove -n qgis_pyhat
3. To install the PyHAT library and dependencies:
conda config --add channels conda-forge
conda config --add channels usgs-astrogeology
conda install -c usgs-astrogeology pyhat
4. To install QGIS:
- On windows:
conda install -c conda-forge qgis
- On linux:
conda install -c conda-forge qgis
- On OSX:
conda install -c conda-forge qgis
5. Download the PyHAT QGIS plugin repo: https://github.com/USGS-Astrogeology/pyhat_qgis.git
- Click on the green "Clone or Download" button
- Click "Download Zip"
6. Finish installation through QGIS:
-
Run QGIS:
$ qgis
-
On the bar at the top, click "Plugins > Manage and Install Plugins..."
-
Select the ZIP file downloaded in Step 5, hit "Install Plugin"
-
You should see PyHAT listed as one of the plugins.
- On the bar at the top in QGIS you should now see 'PyHAT'
- Click on it to see the two different menus for algorithms: M3, CRISM
- Make sure to have a layer (image) selected, and then click on any algorithm name
- You should now be able to view your new image in QGIS
NOTE: The images are saved on your computer, to change the path to somewhere you can find follow these steps:
- Click on PyHAT on the top menu
- Click on 'Setup Outpath', a pop-up window should have appeared.
- Enter the FULL path of where you want to store your images i.e. /home/your_username/Desktop/
- Click okay and start going!
1. Download this .tif to use as sample data: M3_4030seg_L2_aristcrater.tif
2. In QGIS, open the sample tif file as a layer
3. Select from the PyHAT option at the top:
- PyHAT > M3 > Pipe > bd1050
4. A new layer will have been placed in your view