package geojson

  1. Overview
  2. Docs

A functor that takes a JSON parsing implementation and returns a GeoJSON parser and constructor.


module J : Json


type json = J.t

The internal representation of a JSON value.

module Geometry : sig ... end


module Feature : sig ... end

Features which contain a geometry

type geojson =
  1. | Feature of Feature.t
  2. | FeatureCollection of Feature.Collection.t
  3. | Geometry of Geometry.t

A geojson object which could be a geometry, a feature or a collection of features.

type t

The type for GeoJSON objects.

val geojson : t -> geojson

geojson t will extract geojson value from t (a GeoJSON object)

val bbox : t -> float array option

bbox t will extract bbox value from t (a GeoJSON object)

val v : ?bbox:float array -> geojson -> t

v geojson bbox combines geojson and bbox to return a GeoJSON object (a type t)

val of_json : json -> (t, [ `Msg of string ]) Stdlib.result

of_json json converts the JSON to a GeoJSON object (a type t) or an error.

val to_json : t -> json

to_json g converts the GeoJSON object g to JSON

module Accessor : sig ... end
module Random : sig ... end

Innovation. Community. Security.