A command-line tool for searching and processing LINZ S3 assets using STAC (Spatial Data on the Web) specifications. The tool will print asset URLs to stdout and optionally download the resource. This fills a very specific need that could probably have been resolved using existing solutions, but this works for my purposes.
- Search S3 buckets for tiles based on spatial coordinates.
- Process search results, including counting tile numbers.
- Prompt users to choose a dataset from search results.
- Download tiles or print their URLs.
If you want to build the project yourself:
- Rust 2021 Edition
- Cargo Dependencies:
clap
for command-line argument parsing.env_logger
for logging configuration.futures
for async/await support.log
for logging utilities.regex
for regular expression matching.stac
for STAC specification implementation.tokio
for asynchronous runtime.
Pre-built binaries are available for Windows, macOS, and Linux. You can download the appropriate binary for your operating system from the Releases page.
- Download the binary for your operating system.
- Run the tool from your terminal:
or
./linz_s3 <bucket> <lat> <lon> <lat1> <lon1>
Follow the prompts to search and process S3 assets../linz_s3 --help
If you prefer to build the project yourself, you will need rust installed on your system.
- Clone the repository:
git clone https://github.com/your-repo-name.git
cd linz_s3
Build the project:
cargo build --release
Run the tool:
./target/release/linz_s3 <bucket> <lat> <lon> <lat1> <lon1>
- This project uses the STAC specification for spatial data management.
- Error handling and logging are minimal; consider adding more robust error handling and logging mechanisms.
This project uses GitHub Actions to build and test the tool on Windows, macOS, and Linux. Pre-built binaries are automatically generated and uploaded to the Releases page after each new version tag.
Add more features, such as processing tile data or exporting results to a file. Improve error handling and logging for a better user experience.