package geojson

  1. Overview
  2. Docs
module Optics : sig ... end

The accessor module uses optics to allow users to build reusable values that can be used to get values deeply nested in GeoJSON values. Bare in mind if you care more about performance and/or memory footprint, you are probably better off writing pattern-matching statements by hand than using accessors.

val get : ('a, 'b) Optics.Lens.t -> 'a -> 'b

get lens v focuses onto the field in lens for the value v.

val geojson : (t, geojson) Optics.Lens.t

A lens for focusing on the geojson value.

val bbox : (t, float array option) Optics.Lens.t

A lens for focusing on the bounding box if any.

A prism for matching on a feature.

A prism for matching on a geometry.

val feature_collection : (geojson, Feature.Collection.t) Optics.Prism.t

A prism for matching on a feature collection.

module Feature : sig ... end
module Geometry : sig ... end

Infix Operators

These operators allow you to combine lenses and prisms into more complicated lenses and prisms.

val (>>) : ('a, 'b) Optics.Optional.t -> ('b, 'c) Optics.Optional.t -> ('a, 'c) Optics.Optional.t
val (&>) : ('a, 'b) Optics.Optional.t -> ('b, 'c) Optics.Lens.t -> ('a, 'c) Optics.Optional.t
val ($>) : ('a, 'b) Optics.Optional.t -> ('b, 'c) Optics.Prism.t -> ('a, 'c) Optics.Optional.t
val (>&) : ('a, 'b) Optics.Lens.t -> ('b, 'c) Optics.Prism.t -> ('a, 'c) Optics.Optional.t
val (>$) : ('a, 'b) Optics.Prism.t -> ('b, 'c) Optics.Lens.t -> ('a, 'c) Optics.Optional.t
val (&) : ('a, 'b) Optics.Lens.t -> ('b, 'c) Optics.Lens.t -> ('a, 'c) Optics.Lens.t
val ($) : ('a, 'b) Optics.Prism.t -> ('b, 'c) Optics.Prism.t -> ('a, 'c) Optics.Prism.t
OCaml

Innovation. Community. Security.