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
- Ensure GDAL and its Python bindings are installed
brew upgrade gdal1b. Ensure Rust is installed (for datacube-compute):
brew install rustup
rustup-init
export PATH="$HOME/.cargo/bin:$PATH"- 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 info3a. (Optional) Install development dependencies:
poetry install --with dev3b. Install dependencies:
poetry install- Run the CLI tool:
poetry run ldn --helpFor development purposes, you can install the package with development dependencies:
# Using Poetry
poetry install --with devRun: 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"
Simply run: pytest
You can run these:
poetry run ldn --helppoetry run ldn versionpoetry run ldn grid list-countriesormake 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
To build the Docker image locally using Buildx, run:
docker buildx build . --tag ldn-lulc:latestOnce built, you can run any command in the container:
docker run --rm ldn-lulc:latest ldn grid list-countries