···
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.
6
+
## Command Line Usage
8
+
The `mlgpx` CLI provides tools for manipulating GPX files from the command line.
13
+
# Install from source
17
+
# Or use opam (when published)
21
+
### Convert Waypoints to Track
25
+
mlgpx convert waypoints.gpx track.gpx
27
+
# With custom track name
28
+
mlgpx convert --name "My Route" waypoints.gpx route.gpx
30
+
# Sort waypoints by timestamp before conversion
31
+
mlgpx convert --sort-time waypoints.gpx sorted_track.gpx
33
+
# Sort by name and preserve original waypoints
34
+
mlgpx convert --sort-name --preserve waypoints.gpx mixed.gpx
36
+
# Verbose output with description
37
+
mlgpx convert --verbose --desc "Generated route" waypoints.gpx track.gpx
43
+
# Basic file information
46
+
# Detailed analysis with waypoint details
47
+
mlgpx info --verbose file.gpx
56
+
# Command-specific help
57
+
mlgpx convert --help
The library is split into four main components:
···
let () = create_simple_gpx ()
232
-
## Command Line Usage
234
-
The `mlgpx` CLI provides tools for manipulating GPX files from the command line.
239
-
# Install from source
240
-
dune build @install
243
-
# Or use opam (when published)
247
-
### Convert Waypoints to Track
251
-
mlgpx convert waypoints.gpx track.gpx
253
-
# With custom track name
254
-
mlgpx convert --name "My Route" waypoints.gpx route.gpx
256
-
# Sort waypoints by timestamp before conversion
257
-
mlgpx convert --sort-time waypoints.gpx sorted_track.gpx
259
-
# Sort by name and preserve original waypoints
260
-
mlgpx convert --sort-name --preserve waypoints.gpx mixed.gpx
262
-
# Verbose output with description
263
-
mlgpx convert --verbose --desc "Generated route" waypoints.gpx track.gpx
269
-
# Basic file information
270
-
mlgpx info file.gpx
272
-
# Detailed analysis with waypoint details
273
-
mlgpx info --verbose file.gpx
282
-
# Command-specific help
283
-
mlgpx convert --help