package geojson

  1. Overview
  2. Docs

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.