GeoSpatial Indexer for CouchDB 2.0
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Easton - External port based spatial indexing

This application implements a spatial indexing port program as well as an API to that program for use by other Erlang applications.

Source files

Easton consists of the following Erlang source files:

  • - application resource file
  • easton_constants.hrl - header file defining error codes and directory locations
  • easton_geojson.erl - set of routines to convert between WKB (Well Known Binary - an open binary format for portably representing geospatial data) and JSON
  • easton_geojson.hrl - header file for above
  • easton_index.erl - takes index operating requests from hastings and passes them through to the C++ based spatial index, search/query and re-projection routines

Easton also consists of the following C++ source files:

  • - provides multiple easton commands for execution, including "get information of index", "synchronize index", "close index", "search against Geo entries", "remove or update entry", "put, get or delete user’s key and value".
  • - optimisation to reduce reliance on slow to initialise CSMap routines.
  • - various geospatial operations, including implementation of relations and circle and ellipse queries.
  • - create, manage and use index by leveraging C APIs provided by libspatialindex, and encapsulate Geo entry using SpatialEntry, TemporalEntry, HistoricalEntry and TopHits.
  • - initial routines for signals, csmap, pid, etc.
  • - io routines for port comms and wrapper around LevelDB (used for storing data about the index)
  • - creates index objects, creation includes several checks done by, however those checks are only caught at the very top level of easton_index and means uninformative error messages are passed back to the user. See FB case 57954 (
  • - performs reprojection of geometries. Done by libgeos.

and the following relevant header files:

  • config.hh - defines constants of easton, including index type, command name, filter type, error code.
  • easton.hh - defines constants for namespace of "easton", "cmd", "geo" and "io".
  • exceptions.hh - defines exceptions thrown by easton_index process, these should find their way either to logs or to the user. Exceptions defined for index errors, geo errors easton errors and easton exits.


The easton_index executable generates some log messages that find their way to splunk as well as errors that find their way back to the user. As noted above some of these messages are vague.


Easton does not generate metrics, all geospatial metrics are generated by hastings.