package mlgpx
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
On This Page
  
  
  Library and CLI for parsing and generating GPS Exchange (GPX) formats
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
  
    
      mlgpx-1.0.0.tbz
    
    
        
    
  
  
  
    
  
  
    
  
        md5=5342bb7e601273245a9fe263e5a08770
    
    
  sha512=cd73b16e988b3ed3cc427a6c6c6d6c9c745adb1eb7efaae3c34e8d006e9c03d9f9d2616cd4118564bd9873903969d3e4053b585e79dbd3e3e7d0f541e2faac83
    
    
  doc/mlgpx.eio/Gpx_eio/index.html
Module Gpx_eioSource
Eio API for GPX operations
This module provides a direct-style API for GPX operations using Eio's effects-based concurrent I/O system. It offers convenient functions for common GPX operations while maintaining structured concurrency.
Usage Example
  open Gpx_eio
  let main env =
    let fs = Eio.Stdenv.fs env in
    
    (* Create a GPX document *)
    let lat = Gpx.Coordinate.latitude 37.7749 |> Result.get_ok in
    let lon = Gpx.Coordinate.longitude (-122.4194) |> Result.get_ok in
    let wpt = Gpx.Waypoint.make lat lon |> Gpx.Waypoint.with_name "San Francisco" in
    let gpx = Gpx.make_gpx ~creator:"eio-example" |> Gpx.Doc.add_waypoint wpt in
    
    (* Write with validation *)
    write ~validate:true fs "output.gpx" gpx;
    
    (* Read it back *)
    let gpx2 = read ~validate:true fs "output.gpx" in
    Printf.printf "Read %d waypoints\n" (List.length (Gpx.Doc.waypoints gpx2))
  let () = Eio_main.run mainModule Re-exports
Convenience File Operations
These functions provide simple file I/O with the filesystem from Eio.Stdenv.fs.
Read and parse GPX file.
Write GPX to file.
Source
val write_with_backup : 
  ?validate:bool ->
  fs:[> Eio.Fs.dir_ty ] Eio.Path.t ->
  string ->
  Gpx.t ->
  stringWrite GPX to file with automatic backup.
Stream Operations
Operations for reading/writing GPX from/to Eio flows.
Read GPX from Eio source.
Write GPX to Eio sink.
Print GPX statistics to sink.
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
  On This Page