This directory contains examples demonstrating how to use RasterFakers both as a library and as a CLI tool.
You can run any Rust example using cargo:
# Run basic usage example
cargo run --example basic_usage
# Run custom pattern example
cargo run --example custom_pattern
# Run multiband example
cargo run --example multiband
# Run Cloud Optimized GeoTIFF example
cargo run --example cog
The cli_examples.sh
script contains various CLI usage examples. Make sure the script is executable:
# Make the script executable
chmod +x cli_examples.sh
# Run the examples
./cli_examples.sh
basic_usage.rs
: Demonstrates the simplest way to generate a GeoTIFF using the librarycustom_pattern.rs
: Shows how to create and use a custom data pattern (chessboard pattern)multiband.rs
: Examples of creating multi-band GeoTIFFscli_examples.sh
: Various command-line usage examplescog.rs
: Demonstrates how to create a COG
Make sure you have installed RasterFakers either through cargo or by building it locally:
# Install from crates.io
cargo install rasterfakers
# Or build locally from the project root
cargo build --release