package dns

  1. Overview
  2. Docs

Loc

A locator record (LOC) is used to express location information associated with domain.

See RFC 1876.

type t = {
  1. latitude : int32;
  2. longitude : int32;
  3. altitude : int32;
  4. size : int;
  5. horiz_pre : int;
  6. vert_pre : int;
}

The type of a Loc record.

val parse : latitude:((int32 * int32 * int32) * [ `North | `South ]) -> longitude:((int32 * int32 * int32) * [ `East | `West ]) -> altitude:int64 -> precision:(int64 * int64 * int64) -> t

parse ~latitude ~longitude ~altitude ~precision Parse a human-readable format to a Loc record.

latitude and longitude are represented by ((degress, mintues, seconds), direction)

altitude is the altitude in centimeters.

precision is represented by (size, horizontal precision, vertical percision) in meters.

val to_string : t -> string
val pp : t Fmt.t

pp ppf t pretty-prints the Loc record t on ppf.

val compare : t -> t -> int

compare a b compares the Loc record a with b.