Skip to content

auspatious/ldn-lulc

Repository files navigation

Land Degradation Neutrality - Land Use/Land Cover

This repo contains scripts relevant to the development of new LULC datasets for the UN Small Island Developing States (SIDS).

The ldn folder contains an installable

Quickstart

  1. Ensure GDAL and its Python bindings are installed
brew upgrade gdal

1b. Ensure Rust is installed (for datacube-compute):

brew install rustup
rustup-init
export PATH="$HOME/.cargo/bin:$PATH"
  1. Install Poetry if you don't have it already and create and activate a virtual environment:
pip install poetry
poetry env use $(brew --prefix python@3.12)/bin/python3.12
poetry env info

Using Poetry (recommended)

3a. (Optional) Install development dependencies:

poetry install --with dev

3b. Install dependencies:

poetry install
  1. Run the CLI tool:
poetry run ldn --help

Development

For development purposes, you can install the package with development dependencies:

# Using Poetry
poetry install --with dev

To add a dependency

Run: poetry add --group dev pytest

Others: poetry add "dep-tools@git+https://github.com/digitalearthpacific/dep-tools.git" poetry add "datacube-compute@git+https://github.com/auspatious/datacube-compute.git"

To run tests

Simply run: pytest

Running Commands

You can run these:

  • poetry run ldn --help
  • poetry run ldn version
  • poetry run ldn grid list-countries or make grid-list-countries

Future commands could look like:

  • Run our random forest model to predict/classify a tile: ldn process --tile-id xxx.
  • Get a class: ldn grid <class_name> e.g. forest or grassland

Building and Running the Docker Image

To build the Docker image locally using Buildx, run:

docker buildx build . --tag ldn-lulc:latest

Once built, you can run any command in the container:

docker run --rm ldn-lulc:latest ldn grid list-countries

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors