A modern, GIS-centric foundation for building Geotechnical Management Systems that integrate multiple data sources for comprehensive subsurface intelligence.
Transform traditional boring log databases into integrated spatial intelligence platforms that leverage ALL available data sources - from surface distress patterns to elevation changes - for better infrastructure decisions.
The core value of this repository is a comprehensive database schema designed specifically for geotechnical asset management. This schema can serve as the foundation for any agency looking to build a modern GMS.
erDiagram
%% Core Geotechnical Tables
PROJECTS ||--o{ GEOTECHNICAL_POINTS : contains
GEOTECHNICAL_POINTS ||--o{ SUBSURFACE_LAYERS : has
GEOTECHNICAL_POINTS ||--o{ SPT_RESULTS : has
GEOTECHNICAL_POINTS ||--o{ LABORATORY_TESTS : has
SUBSURFACE_LAYERS ||--o{ LABORATORY_TESTS : tested_in
%% Asset Management
GEOTECHNICAL_ASSETS ||--o{ SLOPE_INVENTORY : details
GEOTECHNICAL_ASSETS ||--o{ RETAINING_WALLS : details
GEOTECHNICAL_ASSETS ||--o{ FOUNDATION_INVENTORY : details
GEOTECHNICAL_ASSETS ||--o{ ASSET_INSPECTIONS : tracked_by
%% Risk Management
RISK_FEATURES ||--o{ SINKHOLE_DETAILS : classified_as
RISK_FEATURES }o--o{ STABILIZATION_MEASURES : mitigated_by
%% Data Integration
GEOTECHNICAL_POINTS }o..o{ SURFACE_OBSERVATIONS : "correlated via proximity"
GEOTECHNICAL_POINTS }o..o{ MAINTENANCE_RECORDS : "correlated via proximity"
SURFACE_OBSERVATIONS }o..o{ MAINTENANCE_RECORDS : "correlated via proximity"
%% Correlation System
DATA_CORRELATIONS }o--|| GEOTECHNICAL_POINTS : references
DATA_CORRELATIONS }o--|| SURFACE_OBSERVATIONS : references
DATA_CORRELATIONS }o--|| MAINTENANCE_RECORDS : references
- Boring locations with full metadata
- Subsurface stratigraphy layers
- SPT blow counts and refusal data
- Flexible laboratory test storage (JSONB)
- Project-based organization
- Earth Structures: Slopes, embankments, levees
- Retaining Systems: MSE walls, soil nail walls, sheet piles
- Foundations: Bridge piles, spread footings, drilled shafts
- Stabilization: Rock bolts, anchors, drainage systems
- Complete inspection and monitoring history
- Sinkholes: Active, historical, and repaired
- Karst Zones: Risk areas and buffers
- Landslides: Historical and potential
- Settlement Zones: Monitoring and mitigation
- Risk levels and mitigation tracking
- Surface distress observations (ARAN data)
- Maintenance and repair history
- Digital elevation models and slope analysis
- Weather and environmental data
- Traffic loading information
- Automatic correlation discovery
- Spatial indexing for all geographic data
- Temporal tracking (valid_from, valid_to)
- Data quality and confidence scoring
- JSONB flexibility for evolving requirements
- Materialized views for performance
- Built-in spatial analysis functions
- Spatial-First: Every location uses PostGIS geometry types
- Flexible Storage: JSONB for varying test types and metadata
- Quality Tracking: Confidence levels and data source tracking
- Integration Ready: Correlation system links any data types
- Performance Optimized: Proper indexes and materialized views
- Standards Compliant: Follows DIGGS and OGC specifications
For Agencies: This schema provides a production-ready foundation that can be implemented as-is or customized for specific needs. It represents industry best practices and lessons learned from multiple DOT implementations.
# Clone the repository
git clone https://github.com/[your-org]/gms-foundation
cd gms-foundation
# Start the entire stack (includes full database schema setup)
docker-compose up -d
# Check that services are running
docker-compose ps
# Access the services
# Web Interface: http://localhost:8080
# API: http://localhost:8000
# PgAdmin: http://localhost:5050 (admin@gms.local / admin)
# Database Connection
# Host: localhost, Port: 5432
# Database: gms_foundation, User: gms_user, Password: gms_password- Docker and Docker Compose
- Git
- 8GB+ RAM recommended
- 10GB+ free disk space
- PostgreSQL with PostGIS - Spatial database engine
- FastAPI - RESTful API with spatial query capabilities
- Leaflet.js - Web-based visualization
- ETL Scripts - Data integration pipelines
The system is designed to integrate multiple data sources:
- Geotechnical Borings - Traditional SPT, lab tests, stratigraphy
- Surface Imagery (ARAN) - Pavement distress, rutting, cracking
- Digital Elevation Models - Slope analysis, subsidence detection
- Maintenance Records - Repair history, failure patterns
- Weather Data - Environmental impacts on infrastructure
- Traffic Loading - ESAL calculations and pavement stress
gms-foundation/
βββ database/
β βββ schema/ # PostgreSQL/PostGIS schema files
β βββ migrations/ # Database migration scripts
β βββ sample_data/ # Example datasets
βββ etl/
β βββ borings/ # DIGGS-compliant boring data imports
β βββ elevation/ # DEM and LiDAR processing
βββ api/ # FastAPI REST API
βββ visualization/ # Web interface (Leaflet.js)
βββ docker/ # Docker configuration
βββ scripts/ # Utility scripts
βββ docs/ # Additional documentation
The complete database schema is implemented in /database/schema/ with the following SQL files:
- 01_create_database.sql - Database initialization and PostGIS setup
- 02_core_tables.sql - Core geotechnical data tables
- 03_integration_tables.sql - External data source integration
- 04_views_functions.sql - Spatial analysis functions and views
- 05_asset_inventory.sql - Geotechnical asset and risk management
See the detailed schema documentation for complete table definitions and relationships.
The FastAPI provides RESTful endpoints for all operations:
GET /api/borings- List boring locations with filteringGET /api/borings/{id}- Detailed boring informationPOST /api/spatial/search- Search within radius
GET /api/analysis/maintenance-frequency- Maintenance patternsGET /api/analysis/subsurface-profile- Generate cross-sectionsGET /api/correlations- Find data relationships
GET /api/stats/grid- Pre-calculated grid statistics
python etl/boprings/import_boring_csv.py \python etl/elevation/process_dem_data.py \
--dem-file data/elevation.tif \
--slope-threshold 30The system automatically correlates different data sources based on spatial proximity:
- Surface distress is linked to nearby borings
- Maintenance records are correlated with subsurface conditions
- Slope stability is analyzed with geotechnical properties
The web interface provides:
- Interactive 2D map with multiple data layers
- Cross-section generation tool
- Heat maps for various metrics
- Time-series analysis for temporal data
The system supports various analytical functions:
- Correlation Analysis - Discover relationships between surface distress and subsurface conditions
- Predictive Maintenance - Use historical patterns to predict future failures
- Risk Assessment - Combine multiple factors to identify risk zones
- Cost Optimization - Prioritize maintenance investments based on risk and condition
Create a .env file in the project root:
# Database
DB_HOST=localhost
DB_PORT=5432
DB_NAME=gms_foundation
DB_USER=gms_user
DB_PASSWORD=your_secure_password
# API
API_PORT=8000
API_WORKERS=4
# Web
WEB_PORT=8080Standard PostgreSQL connection string:
postgresql://gms_user:password@localhost:5432/gms_foundation
# Run unit tests
docker-compose exec api pytest
# Run integration tests
./scripts/run_integration_tests.sh
# Test spatial queries
docker-compose exec postgres psql -U gms_user -d gms_foundation -f tests/spatial_tests.sql- Database Schema Details
- API Documentation (when running)
- ETL Pipeline Guide
- Spatial Analysis Functions
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built on open standards including DIGGS and OGC specifications
- Leverages PostGIS for spatial capabilities
- Inspired by modern GIS-centric infrastructure management approaches
- GitHub Issues: Report bugs or request features
- Machine learning models for predictive analysis
- Real-time data streaming capabilities
- Mobile application for field data collection
- Advanced 3D visualization
- Integration with BIM systems
- Automated report generation
Remember: This is a foundation. Build upon it to create a GMS that meets your specific needs while maintaining the core principle of integrated, spatially-aware data management.