package geojson

  1. Overview
  2. Docs
Pure OCaml library for GeoJSON

Install

Dune Dependency

Authors

Maintainers

Sources

geojson-0.2.0.tbz
sha256=3e44559e8eb8587a5cbcdcb508dd1464204b4e5f7a4c9819d4f91dd4f110cd9b
sha512=821d423219ccb27d446bdfa76404bbf4e03c4e68e78d66bff3a70bbc6dff9aebcf8c4844c89b2cc922b459767844c2195202790d0c9ca4eefb310e35ca315901

doc/geojson/Geojson/module-type-S/Feature/index.html

Module S.FeatureSource

Features which contain a geometry

Sourcetype t

A feature object is a geojson object with optional geometry and properties members.

Sourceval geometry : t -> Geometry.t option
Sourceval properties : t -> json option
Sourceval foreign_members : t -> (string * json) list

foreign_members t will extract name/value pair of a foreign member from t (a GeoJSON object)

Sourceval id : t -> [ `String of string | `Float of float ] option

id f extracts the identifier for the feature if it exists.

Sourceval v : ?id:[ `String of string | `Float of float ] -> ?properties:json -> ?foreign_members:(string * json) list -> Geometry.t -> t

v geo creates a new feature object, you may wish to provide a properties JSON object for the feature too.

Sourcemodule Collection : sig ... end
OCaml

Innovation. Community. Security.