Skip to content

Launching

Bernardo Niebuhr edited this page Apr 4, 2017 · 11 revisions

Downloading and Launching LSCorridors

Downloading

You can clone LSCorridors in your computer using git or GitHub Desktop:

git clone https://github.com/LEEClab/LS_CORRIDORS.git

Alternatively, you can download it as a zip file. In this case, unzip the package in your local folder of preference.

Launching GRASS GIS

After installing GRASS, you must execute it by clicking on GRASS 7.0 icon. This will open the GRASS terminal, where instructions and commands may be called by command line. After that, a “Welcome” window will open asking you about the folder to store the GRASS GIS location (GRASS is organized in projects or LOCATIONs, which store geographic information about the maps; each location can have one or more MAPSETS). You can also create a new location, so that you must set information of the maps to be used (Datum, Coordinate Reference System etc.). You can find information about GRASS initialization here.

More information on creating a GRASS GIS project may be found in the pdf tutorial.

Running LSCorridors package

First you have to change to the _LS_Corridors_v1_0_0_stable folder in your computer, where the source code is located (LS_Corridors_v1_0_0.py). The code is the same for all Operational Systems. Then, you may call the package:

# Change to code directory
cd "C:/Github/LS_CORRIDORS/_LS_Corridors_v1_0_0_stable"

# Run LSCorridors
python LS_Corridors_v1_0_0.py

On MS Windows, you may have to change to the partition where the code is located before changing to its directory. E.g.:

D:
cd "D:/LS_CORRIDORS/_LS_Corridors_v1_0_stable"

Testing LSCorridors package

To test the package and make sure it is running properly, you may first open GRASS directly on the location GIS_DB_Demo_location, which you download with LSCorridors and is already set with the geographical information of Resistance_map1 of the demonstration maps database. Once inside GRASS, instead of running the main code, you can run the script test_LS_corridors.py:

# Change to code directory
cd "C:/Github/LS_CORRIDORS/_LS_Corridors_v1_0_0_stable"

# Run test script
python test_LS_corridors.py

If you have problems, you can contact us by e-mail or by opening an issue.