package topojson

  1. Overview
  2. Docs
type t

A topology object

type transform = {
  1. scale : float * float;
  2. translate : float * float;
}

A transform object

val objects : t -> (string * Geometry.t) list

The underlying objects of the topology object.

val arcs : t -> Geometry.Position.t array array

The database of linestrings used by other geometries.

val foreign_members : t -> (string * json) list

The extra fields that were in the topology object.

val transform : t -> transform option

Get the transform object of a Topology object.

val v : ?foreign_members:(string * json) list -> ?transform:transform -> arcs:Geometry.Position.t array array -> (string * Geometry.t) list -> t

Construct a new topology object getting the arcs and the geometry objects.

val to_json : ?bbox:float array -> t -> json
val of_json : json -> (t, [ `Msg of string ]) result
OCaml

Innovation. Community. Security.