package mlgpx

  1. Overview
  2. Docs

Module Gpx.MetadataSource

GPX metadata including bounds

The Metadata module handles document-level information:

  • File name and description
  • Author and copyright information
  • Creation time and keywords
  • Geographic bounding box of all data
  • Links to related resources

GPX metadata and bounds types

Sourcetype bounds = {
  1. minlat : Coordinate.latitude;
  2. minlon : Coordinate.longitude;
  3. maxlat : Coordinate.latitude;
  4. maxlon : Coordinate.longitude;
}

Bounding box

Sourcetype t = {
  1. name : string option;
  2. desc : string option;
  3. author : Link.person option;
  4. copyright : Link.copyright option;
  5. time : Ptime.t option;
  6. keywords : string option;
  7. bounds : bounds option;
  8. extensions : Extension.t list;
}

Main metadata type

Bounds Operations

Sourcemodule Bounds : sig ... end

Metadata Operations

Sourceval empty : t

Create empty metadata

Sourceval make : name:string -> t

Create metadata with name

Sourceval name : t -> string option

Get name

Sourceval description : t -> string option

Get description

Sourceval author : t -> Link.person option

Get author

Get copyright

Get links

Sourceval time : t -> Ptime.t option

Get time

Sourceval keywords : t -> string option

Get keywords

Sourceval bounds_opt : t -> bounds option

Get bounds

Sourceval extensions : t -> Extension.t list

Get extensions

Functional operations for building metadata

Sourceval with_name : t -> string -> t

Update name

Sourceval with_description : t -> string -> t

Update description

Sourceval with_keywords : t -> string -> t

Update keywords

Sourceval with_time : t -> Ptime.t option -> t

Update time

Sourceval with_bounds : t -> bounds -> t

Update bounds

Sourceval with_author : t -> Link.person -> t

Update author

Update copyright

Add link

Sourceval add_extensions : t -> Extension.t list -> t

Add extensions

Sourceval compare : t -> t -> int

Compare metadata

Sourceval equal : t -> t -> bool

Test metadata equality

Sourceval pp : Format.formatter -> t -> unit

Pretty print metadata

OCaml

Innovation. Community. Security.