Digital Elevation Model Builder for Agricultural Applications
DEMBuilder is a high-performance desktop application designed to process GPS data from agricultural operations and generate Digital Elevation Models (DEMs) optimized for precision farming and tractor guidance systems.
- Multi-GPS Data Processing: Handle up to 6 GPS units recording simultaneously
- Large Dataset Support: Process 600,000+ GPS points with streaming algorithms
- Real-time Progress Tracking: Visual progress bars for all operations
- Interactive Boundary Selection: Draw field boundaries on satellite maps
- High-Performance Filtering: Parallel processing with HDOP, RTK, and Age filters
- Multiple Export Formats: RgF DEM, GeoTIFF, and text file exports
- RgF DEM Format: Single-file agricultural packages optimized for ABLS software
- GeoTIFF Export: AgOpenGPS-compatible tiled exports with GDAL integration
- Text Export: ASCII grid format for general use
- Thumb Drive Optimized: Single files perfect for field transfer
- Parallel Processing: Multi-core CPU utilization for filtering and boundary operations
- Streaming Processing: Memory-efficient handling of massive datasets
- Spatial Indexing: Optimized point-in-polygon testing with bounding box pre-filtering
- Asynchronous Operations: Responsive UI during long-running processes
DEMBuilder/
βββ MainWindow.xaml(.cs) # Main application window with wizard navigation
βββ Pages/ # Wizard pages for step-by-step workflow
β βββ LoadDataPage # GPS data import (NMEA files)
β βββ FilterDataPage # GPS point filtering (HDOP, RTK, Age)
β βββ BoundaryPage # Interactive boundary selection
β βββ ProjectionPage # Coordinate system setup
β βββ DemGenerationPage # DEM creation
β βββ DemPreviewPage # DEM visualization
β βββ ExportPage # Export format selection and processing
βββ Services/ # Core processing services
β βββ Boundary/ # Boundary filtering services
β βββ Dem/ # DEM generation services
β βββ Export/ # Export format handlers
β βββ Filter/ # GPS point filtering
β βββ Projection/ # Coordinate system projection
β βββ Streaming/ # Large dataset processing
βββ Models/ # Data models and event arguments
βββ Dialogs/ # Custom dialog windows
- HighPerformanceBoundaryFilter: Parallel boundary filtering with bounding box optimization
- HighPerformanceFilter: Multi-threaded GPS point filtering
- StreamingDemService: Memory-efficient DEM generation for massive datasets
- RgFdemExportService: Agricultural-optimized single-file export
- RgFdemExportService: Creates
.RgFdemfiles for ABLS integration - GdalExportService: GeoTIFF export with GDAL integration
- StreamingExportService: Large dataset export handling
- OS: Windows 10/11 (x64)
- Framework: .NET 8.0
- RAM: 8GB minimum, 16GB+ recommended for large datasets
- Storage: SSD recommended for large GPS file processing
- .NET 8.0 Windows: Core framework
- WPF: User interface framework
- GMap.NET: Interactive mapping and satellite imagery
- GDAL: Geospatial data processing and GeoTIFF export
- Triangle.NET: Delaunay triangulation for DEM generation
- SQLite: Data storage and indexing
- Ookii.Dialogs: Enhanced file dialogs
- Install .NET 8.0 Runtime
- Install Visual Studio 2022 (for development)
git clone https://github.com/yourusername/DEMBuilder.git
cd DEMBuilder
dotnet restore
dotnet build --configuration Releasedotnet run
# OR
DEMBuilder.exe- Import NMEA files from GPS logging devices
- Supports multiple file selection
- Automatic parsing of GPS coordinates, HDOP, RTK status, and timestamps
- HDOP Filter: Remove points with poor horizontal accuracy
- RTK Status Filter: Keep only RTK Fixed/Float points
- Age Filter: Remove points with old differential corrections
- Real-time progress tracking with parallel processing
- Interactive satellite map view
- Draw boundary polygon by clicking points
- Visual feedback with GPS points overlay
- High-performance boundary filtering with progress tracking
- Automatic reference point calculation
- AgOpenGPS-compatible local tangent plane projection
- Manual reference coordinate adjustment if needed
- Delaunay triangulation of GPS points
- Configurable resolution (default: 0.25m/pixel)
- Memory-efficient processing for large datasets
- Visual DEM preview with elevation coloring
- Quality assessment before export
Choose from multiple export formats:
RgF DEM (.RgFdem) - Recommended
- Single-file agricultural package
- Optimized for ABLS tractor software
- Filename:
Farm_Field_ddmmyy.RgFdem - Contains: metadata, binary elevation data, coordinate system info
GeoTIFF (.tif)
- AgOpenGPS-compatible format
- Tiled output for large areas
- GDAL-based export with proper georeferencing
Text File (.txt/.asc)
- ASCII grid format
- Human-readable elevation data
- Compatible with GIS software
The proprietary RgF DEM format is a ZIP-based container optimized for agricultural use:
Farm_Field_ddmmyy.RgFdem
βββ metadata.json # Complete DEM parameters and bounds
βββ elevation.dem # Binary elevation data (int32 header + float32 grid)
βββ coordinate_system.txt # AgOpenGPS coordinate system info
βββ README.txt # Human-readable documentation
Key Features:
- Single file for easy transfer
- Optimized for USB drives and wireless transfer
- AgOpenGPS-compatible coordinate system
- Complete metadata for ABLS integration
See RgF_DEM_File_Format_Specification.md for complete technical details.
- Streaming Processing: Process datasets larger than available RAM
- Parallel Filtering: Multi-core CPU utilization for point filtering
- Bounding Box Optimization: 80-90% reduction in polygon tests
- Memory Management: Efficient memory usage for 600,000+ point datasets
- Asynchronous Operations: Non-blocking UI during processing
- Progress Reporting: Real-time progress updates every 1000 points or 100ms
- Cancellation Support: User can cancel long-running operations
- Visual Feedback: Progress bars and status messages throughout
- Chunked Processing: Process large DEMs in manageable chunks
- Compression: ZIP-based containers for smaller file sizes
- Binary Formats: Efficient storage of elevation data
- Parallel Export: Multi-threaded export processing
- Resolution: 0.25 meters/pixel
- Tile Size: 50 meters (for GeoTIFF export)
- Batch Size: 10,000 points for parallel processing
- Progress Updates: Every 1,000 points or 100ms
- Coordinate System: Local tangent plane (AgOpenGPS compatible)
Settings can be adjusted in the UI:
- Export resolution and tile size
- Filter thresholds (HDOP, Age)
- Reference coordinates
- Farm and field names
GDAL Initialization Failed
- Ensure GDAL native libraries are properly installed
- Check GDAL_DATA environment variable
- Verify all GDAL DLLs are in the application directory
Out of Memory Errors
- Use streaming processing for datasets >500,000 points
- Increase system RAM or use smaller data chunks
- Close other applications to free memory
Slow Performance
- Ensure SSD storage for large GPS files
- Use parallel processing (enabled by default)
- Consider reducing dataset size or resolution
Export Failures
- Check available disk space
- Verify write permissions to output directory
- Ensure valid farm/field names (no special characters)
- Debug logs are written to
debug.login the application directory - GDAL diagnostic information available in export dialogs
- Progress and performance metrics displayed during operations
- Clone the repository
- Install Visual Studio 2022 with .NET 8.0 support
- Restore NuGet packages:
dotnet restore - Build solution:
dotnet build
- Follow existing naming conventions
- Use async/await for long-running operations
- Implement progress reporting for user operations
- Add comprehensive error handling
- Include XML documentation for public APIs
- Test with large datasets (100,000+ points)
- Verify memory usage and performance
- Test all export formats
- Validate coordinate system accuracy
This project is open source. See LICENSE file for details.
DEMBuilder is designed to integrate seamlessly with ABLS (Agricultural Baseline Location System) tractor software:
- RgF DEM Format: Optimized for ABLS consumption
- Coordinate System: AgOpenGPS-compatible local tangent plane
- File Transfer: Single files optimized for USB and wireless transfer
- Metadata: Complete technical specifications for integration
For ABLS developers, see RgF_DEM_File_Format_Specification.md for complete integration details.
For technical support or questions:
- Review troubleshooting section above
- Check debug logs for error details
- Ensure system meets minimum requirements
- Verify GPS data format compatibility (NMEA)
- β RgF DEM export format with single-file packages
- β High-performance parallel processing for large datasets
- β Interactive boundary selection with progress tracking
- β Multiple export formats (RgF DEM, GeoTIFF, Text)
- β AgOpenGPS-compatible coordinate system
- β Comprehensive error handling and user feedback
- β Memory-efficient streaming processing
- β Visual progress bars throughout application
- Performance: 10x faster boundary filtering with parallel processing
- Memory: Streaming algorithms support unlimited dataset sizes
- UI/UX: Progress bars and responsive interface
- Export: Single-file RgF DEM format for agricultural use
- Compatibility: Full AgOpenGPS coordinate system support
- Reliability: Comprehensive error handling and recovery
DEMBuilder - Precision agriculture starts with precise elevation data. ππ