Skip to content

FOR-CAST/Core-Model-v8-LINUX

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Core-Model-v8-LINUX

Changes to this extension are governed by the Repository Rules from the Technical Advisory Committee (TAC). The TAC are the Custodians of this repository.

This is the combined package and installer for the LANDIS-II 'Core'. The Core also contains the following libraries, which are found in separate repositories:

  • Library-Core
  • Library-Datasets
  • Library-Spatial
  • Library-Utilities

LANDIS Core-Model-v8: Framework-dependent deployment (FDD)

All Core libraries can be accessed via MyGet https://www.myget.org/feed/Packages/landis-ii-v8

Updates

02.18.2019

  • Assembly name changed from "Landis.RasterIO.Gdal" to "Landis.RasterIO.Gdal.Linux". The "Landis.RasterIO.Gdal.Linux (2.0.0)" uses Gdal.Core (1.0.0).

Ubuntu 16.04 LTS


  1. .NET Core SDK Installation:

dotnet-info

  1. git clonehttps://github.com/LANDIS-II-Foundation/Core-Model-v8-LINUX.git

  2. cd /<path to/Core-Model-v8-LINUX/Tool-Console/src

  3. dotnet build -c Release

    Make sure you find all Landis.Console and Landis.Extensions files in Release folder.
    ├── build
    │ ├── extensions
    │ │ └── extensions.xml
    │ ├── license
    │ │ └── LANDIS-II_Binary_license.rtf
    │ └── Release
    │ ├── Landis.Console.deps.json
    │ ├── Landis.Console.dll
    │ ├── Landis.Console.dll.config
    │ ├── Landis.Console.pdb
    │ ├── Landis.Console.runtimeconfig.dev.json
    │ ├── Landis.Console.runtimeconfig.json
    │ ├── Landis.Extensions.deps.json
    │ ├── Landis.Extensions.dll
    │ ├── Landis.Extensions.dll.config
    │ ├── Landis.Extensions.pdb
    │ ├── Landis.Extensions.runtimeconfig.dev.json
    │ └── Landis.Extensions.runtimeconfig.json


Debug (VS Code launch.json)

  • "program": "${workspaceFolder}/Tool-Console/src/bin/Debug/Landis.Console.dll"

    • Make sure your Landis.Console.dll file path
  • "cwd": "

  • "args": [".txt"]


LANDIS-II-v8 Extensions

Prerequisites

  • All LANDIS-II-v8 supporting libraries and extension DLL must be in build/extensions folder.
  • LANDIS-II-v8 Extensions information needs to be included in build/extensions/extensions.xml

Running Scenario

  1. cd <path to your scenario folder>/<your scenario>.txt
  2. dotnet /<path to>/Landis.Console.dll scenario.txt

Expected GDAL Related Error

The problem might be GDAL related error if you see error below.

RasterFactoryError

GDAL dependencies related error fix

  1. cd /<path to (e.g. home/yourname)>/.nuget/packages/gdal.core/1.0.0/runtimes/linux-x64/native

  2. ldd gdal_wrap.so

    It will show dependencies. The libjpeg.so.62 and libpng16.so.16 are not found in this case. Install these dependencies.

    gdal_wrap_dependencies

    Install missing dependencies:

    • sudo apt-get install libjpeg62

    • sudo apt-get install libpng16-16

Compiling LANDIS-II-v8 Extensions

There are many ways to compile LANDIS-II-v8 Extensions. This is one of the options.

Prerequisite: VS Code installation (see in Notes section)

  1. cd /<path to >/Core-Model-v8-LINUX

  2. git clone <path to LANDIS-II-v8 Extension>.git

  3. git clone https://github.com/LANDIS-II-Foundation/Support-Library-Dlls-v8.git

  4. Save all supporting libraries in build/extensions folder.

  5. Edit .csproj file

    1. Add a line below in the first tag (see image below).false

    2. Add lines below after the first tag (see image below).

      ​ ....\build\extensions

    3. Modify supporting libraries reference path to:

      ..\..\build\extensions\Landis.Library.<name>.dll

    extension_csproj

  6. Select .csproj file and right click > Open in Terminal

  7. dotnet build

    Confirm successful build. You will need to debug If you have a problem with building the extension.

  8. dotnet build -c Release

    See build/extensions folder if all supporting libraries and extensions DLLs are created in the folder.

Add LANDIS-II-v8 Extension to extensions.xml

  1. cd <path to where extension information text file direcotry>

  2. dotnet /<path to>/Core-Model-v8-Linux/build/Release/Landis.Extensions.dll add "<extensions infomation>.txt"

    To remove an extension:

    dotnet /<path to>/Core-Model-v8-Linux/build/Release/Landis.Extensions.dll remove "<extensions name (e.g. Age-only Succession)"


Notes

Visual Studio Code

Installation:

Note: You will need C# for Visual Studio Code extension for application development.

Installing PowerShell Core on Linux

Installation:

Powershell on VS Code

Prerequisite: PowerShell Core on Linux installation

Installation:

  1. Powershell Extension (ms-vscode.powershell) in VS Code
  2. View > Command Palette... > Search for "Powershell"
  3. Select PowerShell: Show Integrated Console

Integrated Terminal

Landis Extension supporting library import:

  • cd <Landis Extension folder path>/src/lib

  • ./support_libs_download.ps1

Releases

No releases published

Packages

No packages published

Languages

  • C# 96.4%
  • PowerShell 2.0%
  • Batchfile 1.6%