[ANN] geojson and geojsone

On behalf of the geocaml org, I’m happy to announce the first release of geojson and geojsone.

What is GeoJSON?

GeoJSON is defined in RFC7946 as

…a geospatial data interchange format based on JavaScript Object Notation (JSON).

It is a schema for writing geospatial information in JSON often as some combination of “geometries” (e.g. a Point or a Polygon). These are all using the World Geodetic System 1984 (WGS84) coordinate reference system.

An example

A collections of features where the first feature contains a single point.

  "type": "FeatureCollection",
  "features": [
      "type": "Feature",
      "properties": {
        "name": "Place du Capitole"
      "geometry": {
        "coordinates": [
        "type": "Point"

Geojson Library

The geojson library provides functions for reading and writing GeoJSON objects. You must, however, provide a simple interface for the JSON library of your choosing. This was a design decision made to offer better support for using the library in the browser. You can read more about it in the documentation.

Geojsone Library

The geojsone library is inspired by the jsonm library. It vendors jsonm and ports it to a non-blocking implementation provided using effects. Internally it then reconstructs ezjsonm using eio dubbed ezjsone. The purpose of this library is to deal with the fact that GeoJSON documents can be quite big. It should be considered quite experimental. I did a little bit of benchmarking and it seemed to suggest that effects helps lower the memory usage (sometimes…).


Thanks to all of the Outreachy applicants that helped with this library and in particular @IIITM-Jay who did some work at the start of his Outreachy internship on the library.