GPS Exchange Format library/CLI in OCaml

README

Changed files
+55 -53
+55 -53
README.md
···
An OCaml library for parsing and generating GPX (GPS Exchange Format) 1.0 and
1.1 files, and a CLI for common manipulation and query options.
+
## Command Line Usage
+
+
The `mlgpx` CLI provides tools for manipulating GPX files from the command line.
+
+
### Installation
+
+
```bash
+
# Install from source
+
dune build @install
+
dune install
+
+
# Or use opam (when published)
+
opam install mlgpx
+
```
+
+
### Convert Waypoints to Track
+
+
```bash
+
# Basic conversion
+
mlgpx convert waypoints.gpx track.gpx
+
+
# With custom track name
+
mlgpx convert --name "My Route" waypoints.gpx route.gpx
+
+
# Sort waypoints by timestamp before conversion
+
mlgpx convert --sort-time waypoints.gpx sorted_track.gpx
+
+
# Sort by name and preserve original waypoints
+
mlgpx convert --sort-name --preserve waypoints.gpx mixed.gpx
+
+
# Verbose output with description
+
mlgpx convert --verbose --desc "Generated route" waypoints.gpx track.gpx
+
```
+
+
### File Analysis
+
+
```bash
+
# Basic file information
+
mlgpx info file.gpx
+
+
# Detailed analysis with waypoint details
+
mlgpx info --verbose file.gpx
+
```
+
+
### Help
+
+
```bash
+
# General help
+
mlgpx --help
+
+
# Command-specific help
+
mlgpx convert --help
+
mlgpx info --help
+
```
+
## Architecture Overview
The library is split into four main components:
···
let () = create_simple_gpx ()
```
-
## Command Line Usage
-
The `mlgpx` CLI provides tools for manipulating GPX files from the command line.
-
-
### Installation
-
-
```bash
-
# Install from source
-
dune build @install
-
dune install
-
-
# Or use opam (when published)
-
opam install mlgpx
-
```
-
-
### Convert Waypoints to Track
-
-
```bash
-
# Basic conversion
-
mlgpx convert waypoints.gpx track.gpx
-
-
# With custom track name
-
mlgpx convert --name "My Route" waypoints.gpx route.gpx
-
-
# Sort waypoints by timestamp before conversion
-
mlgpx convert --sort-time waypoints.gpx sorted_track.gpx
-
-
# Sort by name and preserve original waypoints
-
mlgpx convert --sort-name --preserve waypoints.gpx mixed.gpx
-
-
# Verbose output with description
-
mlgpx convert --verbose --desc "Generated route" waypoints.gpx track.gpx
-
```
-
-
### File Analysis
-
-
```bash
-
# Basic file information
-
mlgpx info file.gpx
-
-
# Detailed analysis with waypoint details
-
mlgpx info --verbose file.gpx
-
```
-
-
### Help
-
-
```bash
-
# General help
-
mlgpx --help
-
-
# Command-specific help
-
mlgpx convert --help
-
mlgpx info --help
-
```