7 releases
Uses new Rust 2024
| new 0.1.6 | Mar 10, 2026 |
|---|---|
| 0.1.5 | Mar 8, 2026 |
| 0.1.3 | Feb 25, 2026 |
#19 in Geospatial
590KB
13K
SLoC
CLI Tool
The mlt binary provides several commands for working with MLT files:
Commands
dump- Parse an MLT file and dump raw layer data without decodingdecode- Parse an MLT file, decode all layers, and dump the result (supports text andGeoJSONoutput)ui- Interactive terminal visualizer for MLT files
Visualizer
The visualizer command provides an interactive terminal-based UI for exploring MLT files:
# Visualize a single MLT file
cargo run -- ui path/to/file.mlt
# Browse and visualize all MLT files in a directory (recursive)
cargo run -- ui path/to/directory
Directory Mode:
- Lists all
.mltfiles found recursively in the directory - Use
↑/↓to navigate the file list - Press
Enterto open and visualize a file - Press
Escto go back to file list - Press
qto quit
Features:
- Tree View Panel (left): Browse layers and features in a hierarchical tree
- "All Layers" - shows all features from all layers
- Individual layers - shows all features in that layer
- Individual features - shows only the selected feature
- Hovered features are highlighted with underlined green text
- Map Panel (right): Visual representation of the geometries
- Shows the extent boundary as a thin gray rectangle
- Color coding by geometry type:
- Points: Magenta (multipoint: light magenta)
LineStrings: Cyan (multi-linestring: light cyan)- Polygons: Blue/Red based on winding order (multi-polygon: same)
- Polygon winding order visualization:
- Blue: Counter-clockwise rings (typically outer rings)
- Red: Clockwise rings (typically holes)
- Selected features: Yellow
- Hovered features: White
- Automatically adjusts bounds to fit all visible geometries
- Mouse Interaction:
- Hover over geometries to highlight them in the tree view
- Keyboard Navigation:
↑/k- Move selection up↓/j- Move selection downEnter- In layer overview mode, switch to detail mode; In file browser, open selected fileEsc- Go back (detail → overview → file list) or quit if at top levelq- Quit the visualizer
Dependencies
~23–30MB
~600K SLoC