RasterFakeRS
A Rust library and CLI tool for generating fake GeoTIFF files. Perfect for testing GIS applications, creating fixtures, and generating sample raster data.
Features
- Generate GeoTIFF files with customizable dimensions, bands, and data types
- Support for COG creation
- Multiple built-in data patterns (gradient, sine wave, noise)
- Support for custom data generation patterns
- Configurable parameters (projection, transform)
- Available as both a library and CLI tool
- Supports various data types (u8, u16, i16, u32, i32, f32, f64)
Installation
As a Library
Add this to your Cargo.toml:
[]
= "0.2.0"
As a CLI Tool
Note: RasterFakers depends on the GDAL library. Please ensure GDAL is installed on your system.
Usage
Library Usage
use ;
// Create a Cloud Optimized GeoTIFF with custom settings
let geotiff = new
.dimensions?
.bands?
.projection
.geotransform
.output_path
.data_generator
.cloud_optimized
.?;
geotiff.write?;
CLI Usage
# Generate a basic GeoTIFF
# Generate a Cloud Optimized GeoTIFF
# Customize dimensions, data type, and pattern
# Specify projection and resolution
CLI Options
)
)
)
)
Examples
Check out the examples directory for more detailed usage examples:
examples/basic_usage.rs: Simple library usageexamples/custom_pattern.rs: Creating custom data patternsexamples/cli_examples.sh: Various CLI usage examples
Custom Data Patterns
You can create custom data patterns by implementing the DataGenerator trait:
use DataGenerator;
;
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.