OxiGDAL Development Tools
Comprehensive development tools for OxiGDAL: profiling, debugging, validation, and testing utilities for geospatial data processing in Rust.
Features
- Performance Profiler: Track execution time, memory usage, CPU consumption, and custom metrics
- File Inspector: Analyze and inspect geospatial file formats (GeoTIFF, GeoJSON, Shapefile, Zarr, NetCDF, HDF5, GeoParquet, FlatGeobuf)
- Data Validator: Comprehensive validation with error categorization (format, integrity, metadata, projection, bounds)
- Debug Utilities: Enhanced debugging helpers for geospatial operations
- Test Data Generator: Generate synthetic geospatial data for testing and benchmarking
- Benchmarking Tools: Quick and easy performance benchmarking
- 100% Pure Rust: No C/Fortran dependencies, works out of the box
- No Unwrap Policy: All fallible operations return proper Result types with descriptive errors
Installation
Add to your Cargo.toml:
[]
= "0.1.0"
= "0.1.0"
Quick Start
Performance Profiling
use Profiler;
File Inspection
use FileInspector;
Data Validation
use GeoDataValidator;
Test Data Generation
use DataGenerator;
Benchmarking
use BenchmarkRunner;
Usage
Profiler Module
The profiler tracks:
- Execution Time: High-precision duration measurement
- Memory Usage: Memory allocation and delta
- CPU Usage: CPU utilization percentage
- Custom Metrics: User-defined metrics tracking
use Profiler;
let mut profiler = new;
profiler.start;
// Do work...
profiler.stop;
profiler.add_metric?;
// Display formatted report
println!;
// Export as JSON
let json = profiler.to_json?;
Inspector Module
Supported file formats:
- GeoTIFF: Raster imagery with geospatial metadata
- GeoJSON: Vector features in JSON format
- Shapefile: ESRI vector format
- Zarr: Array storage format
- NetCDF: Scientific multidimensional data
- HDF5: Hierarchical data format
- GeoParquet: Columnar vector format
- FlatGeobuf: Efficient binary vector format
use FileInspector;
let inspector = new?;
// Get file information
let info = inspector.info;
println!;
println!;
println!;
println!;
// Display detailed analysis
println!;
Validator Module
Validation categories:
- Format: File format compliance
- Integrity: Data consistency checks
- Metadata: Metadata validity
- Projection: CRS and projection validation
- Bounds: Spatial boundary checks
use GeoDataValidator;
let validator = new;
let result = validator.validate_file?;
// Check validation results
if result.passed else
// Export results
let json = to_string?;
Debugger Module
use Debugger;
let mut debugger = new;
// Log debug information
debugger.log_point?;
// Your code...
debugger.log_point?;
// Display trace
println!;
Generator Module
use DataGenerator;
let generator = new;
// Generate test geometries
let points = generator.generate_points?;
let lines = generator.generate_lines?;
let polygons = generator.generate_polygons?;
// Generate raster data
let raster = generator.generate_raster?;
Benchmarker Module
use BenchmarkRunner;
let mut bench = new;
// Warmup
for _ in 0..5
// Actual benchmarks
for _ in 0..100
// Statistics
println!;
println!;
println!;
println!;
API Overview
| Module | Description |
|---|---|
profiler |
Performance profiling with timing, memory, and CPU metrics |
inspector |
File format analysis and inspection utilities |
validator |
Data validation with detailed error reporting |
debugger |
Debugging utilities and trace logging |
generator |
Synthetic geospatial data generation |
benchmarker |
Benchmarking and performance measurement tools |
Error Handling
This library follows the "no unwrap" policy. All fallible operations return Result<T, DevToolsError> with descriptive error types:
use ;
Performance Considerations
- Profiler: Minimal overhead with optimized memory tracking
- Inspector: Fast file format detection without full parsing
- Validator: Configurable validation depth for performance tuning
- Generator: Efficient synthetic data creation with parallel support
Pure Rust
OxiGDAL Development Tools is 100% Pure Rust with no C/Fortran dependencies. All functionality works out of the box without external libraries.
Examples
See the examples directory for complete working examples including:
- Profile GIS operations
- Inspect various geospatial formats
- Validate geospatial data
- Generate test datasets
- Benchmark algorithms
Documentation
Full API documentation is available at docs.rs/oxigdal-dev-tools.
Testing
Run tests with:
Run all tests including integration tests:
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
License
Licensed under Apache License 2.0 (LICENSE)
Related Projects
- OxiGDAL Core - Core geospatial functionality
- OxiGDAL Algorithms - Spatial algorithms
- OxiGDAL Drivers - Format-specific drivers
- OxiGDAL QC - Quality control utilities