From OpenStreetMap Wiki
Jump to navigation Jump to search
None yet.jpg
Author: See list of contributors
License: GPL-2.0 (free of charge)
Platform: Linux/Ubuntu 20.04
Version: 0.8.5 (2021-06-25)
Language: English
Source code:
Programming language: C++11

Productive OSM API 0.6 implementation


CGImap is a C++ implementation of selected performance critical parts of the OSM API 0.6 using the FastCGI interface. It was originally developed to overcome performance limitations present in the Rails port, including but not limited to large memory consumption, slow XML parsing, overall slow execution.

As CGImap doesn't manage any database schemas and tables on its own, it can only be deployed alongside the Rails port to replace selected API endpoints by their performance optimized counterparts, see Rails port - Production Deployment. When executing requests, CGImap directly interacts with the API DB, bypassing the Rails port altogether.

An important design principle is that for every feature, a Rails port counterpart needs to be implemented first, which doubles as a reference implementation.


Currently, CGImap implements:

  • the "map" API call
  • single node, way and relation fetches
  • multiple node, way and relation fetches
  • the "full" way and relation calls
  • changset metadata downloads, including discussions
  • single node, way and relation history calls
  • single node, way and relation specific version fetches
  • multiple node, way and relation specific version fetches
  • changeset downloads
  • changeset uploads

(Always check the project GitHub repo for an up-to-date list.)

Supported output formats include OSM XML and OSM JSON. For user authentication Basic Auth, OAuth1.0a or OAuth 2.0 can be used.


Current installation instructions are available on the project's GitHub repo. A somewhat dated installation tutorial can be found on the Install page