How onthegomap/planetiler works
Main Components (Top Level)
a) Input Sources Layer:
• Different data source handlers:
• OpenStreetMap (.osm.pbf)
• Natural Earth
• GeoPackage
• Shapefile
• Parquet
• To a common "Source Feature Processor" interface
b) Core Processing Layer:
• Feature Collection Pipeline
• Feature Processing Engine
• Geometry Processing Pipeline
• Feature Merge System
• Tile Coordinate System
c) Output Generation Layer:
• Tile Generation Engine
• Archive Writers (MBTiles/PMTiles)
• Compression Systems
Key Relationships and Data Flow
Input Sources → Feature Processing → Geometry Processing → Tile Generation → Output Archives
Important Subsystems
a) Feature Processing:
• Profile System (for customizing mapping rules)
• Expression Engine (for YAML config processing)
• Tag Processing
• Feature Collection
b) Geometry Processing:
• Geometry Simplification
• Line Splitting
• Polygon Processing
• Coordinate Transformation
c) Memory Management:
• Memory-Mapped File Handling
• Storage Management
• Cache Systems
Worker Pipeline
Parallel processing architecture:
• Worker Distribution System
• Task Queue Management
• Feature Sorting
• Merge Operations
Specific Implementation Details
• JTS Topology Integration
• Expression Engine (CEL)
• Storage Backends (MBTiles/PMTiles)
• Profile Implementation
Performance Components
Systems for:
• Parallel Processing
• Memory Management
• File I/O Optimization
• Resource Monitoring
External Integrations
Connections to:
• Prometheus Metrics
• Logging Systems
• External Data Sources
• Tile Servers
Multiple input/output format support
Key Technical Considerations:
• Annotations for critical performance points
• Scaling capabilities
Remember to:
• Related components visually
• Brief annotations for complex parts
• Both data and control flow
This design reflects Planetiler's architecture as a high-performance, memory-efficient vector tile generator that can process planet-scale data on a single machine.