This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
eHabitat+ GRASS GIS 7 scripts and Python 2.7 library for automatic delineation of habitats within protected areas (PA) and calculation of maps of probabilities to find areas presenting similar ecological characteristics to those found in PA within the corresponding ecoregion. A habitat similarity index (HSI) is computed based on the ratio between the extent of similar areas around the PA and the PA extent, as well as some landscape metrics and indices to characterize similar areas to PA. Processed results are being updated and can be accessed through the DOPA Explorer.
- Install Ubuntu 14.04: https://releases.ubuntu.com/trusty/
- Add the ubuntugis stable repository: https://launchpad.net/~ubuntugis/+archive/ubuntu/ppa
- Add "deb https://cloud.r-project.org/bin/linux/ubuntu trusty-cran35/" to /etc/apt/sources.list
- Install gdal command line utilities
- GRASS GIS 7 requirements:
- Install GRASS GIS 7.0.6 (compiled from source): https://grass.osgeo.org/grass70/source/
- Use the conf_grass7eHabplus.sh config file:
sh conf_grass7eHabplus.sh # edit target folder
make -j2 # 2 is the number of available processors
sudo make install
- Install python-pysal, scipy, scikit-learn, numpy, gdal, python-fiona, libudunits2-dev
- Install R and required libraries:
- vegan
- ggplot2
- rgdal
- ade4
- reshape2
- RColorBrewer
- sf
python segmentation_pca_par.py # it uses parallel processing
python # opens a python environment
from getmeanvar import * # alternative: from getmedianvar import *
run_batch_all()
exit()
python moranvar.py
python subpas_loop_segm_optim.py # move to 'pas' folder
python # opens a python environment
from ehab_optim import * # alternative: from ehab_optim_median import *
run_batch() # it runs using all available processors in parallel
exit()
Rscript thdi.R