A k.LAB plugin component that provides autonomous observation generation capabilities for testing and simulation purposes. This component generates realistic-looking geographic terrains and spatial features using fractal algorithms and procedural generation techniques.
The k.LAB Component Generators is a plugin for the k.LAB semantic modeling platform that specializes in generating synthetic geospatial data for stress-testing, simulation, and modeling scenarios. It provides contextualizers that can create realistic terrain patterns, elevation models, and random geometric shapes within specified spatial extents.
- Fractal Terrain Generation: Uses the diamond-square algorithm to create realistic elevation surfaces
- Configurable Parameters: Adjust detail level, roughness, and value ranges
- Memory-Efficient: Optimized for small to medium-sized spatial grids
- Realistic Patterns: Suitable for simulating elevation, slope, and other terrain characteristics
- Geometric Primitives: Generate points, lines, and polygons
- Spatial Distribution: Non-overlapping shapes within defined envelopes
- Configurable Density: Control frequency and vertex count of generated shapes
- Convex Hull Algorithm: Ensures valid polygon generation
This component is part of the k.LAB services ecosystem. Add it as a dependency to your k.LAB project:
<dependency>
<groupId>org.integratedmodelling</groupId>
<artifactId>klab.component.generators</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
The terrain
function generates fractal surfaces suitable for elevation modeling:
// Basic terrain generation with default parameters
elevation = terrain();
// Customized terrain with specific range and characteristics
elevation = terrain(
range: [0, 3000], // Elevation range in meters
detail: 10, // Higher detail level
roughness: 0.7 // More rugged terrain
);
Parameters:
range
(optional): Min-max range of generated values (default: 0-4000)detail
(optional): Amount of detail in the structure (default: 8)roughness
(optional): Terrain roughness factor (default: 0.55)
Requirements:
- Must be used with S2 (spatial 2D) geometries
- Recommended for small to medium grid sizes due to memory usage
- Plugin Framework: Built on PF4J plugin architecture
- k.LAB Integration: Extends
KlabComponent
for seamless integration - Java 21: Leverages modern Java features and performance improvements
- Diamond-Square Algorithm: Classical fractal terrain generation (Fournier et al. 1982)
- Convex Hull Generation: JTS Topology Suite for valid polygon creation
- Normal Distribution: Apache Commons Math for statistical shape distribution
- Terrain generation operates in RAM for optimal performance
- Recommended for geometries with reasonable grid sizes
- Memory usage scales quadratically with grid dimensions
- k.LAB Core Services: Core k.LAB platform functionality
- Apache Commons Math: Statistical distributions and mathematical operations
- GeoTools: Geospatial data processing and geometry operations
- JTS Topology Suite: Computational geometry algorithms
mvn clean install
mvn test
This project is licensed under the GNU Affero General Public License (AGPL) version 3.0. See the license text for details.
- Ferdinando Villa - Lead Developer
- Email: [email protected]
- Organization: Basque Centre for Climate Change (BC3); IKERBASQUE
Integrated Modelling Partnership
Website: integratedmodelling.org
- Source Code: GitHub Repository
- Issue Tracking: Use GitHub Issues for bug reports and feature requests
For questions, issues, or contributions, please visit the k.LAB community resources or create an issue in the GitHub repository.
This component is part of the k.LAB semantic modeling platform for integrated assessment and environmental modeling.