GeoJSON (.json)

GeoJSON is geographic data expressed as plain JSON. It is the format web maps and APIs speak, and the one you are most likely to meet if a route arrives from a web service rather than a device.

At a glance

Extension .json
Encoding json
Media type application/geo+json
Invented 2008
By An open working group of developers; later standardised by the IETF
Current version RFC 7946, published August 2016

History

GeoJSON began as a community effort rather than a standards-body project: the working group and its discussion started in March 2007 and the specification was finalised in June 2008. The IETF founded the Geographic JSON working group in April 2015 and published the format as RFC 7946 in August 2016, which is the current specification.

Where it is used

GeoJSON is the native currency of web mapping — Leaflet, Mapbox, OpenLayers, GitHub's map preview and countless open-data portals consume it directly. Desktop GIS such as QGIS reads and writes it too. It shows up whenever geographic data has to travel over HTTP.

Structure

A GeoJSON document is a JSON object with a "type" member. Geometries are Point, LineString and Polygon plus their Multi- variants and GeometryCollection; a Feature wraps a geometry together with a free-form "properties" object, and a FeatureCollection holds a list of Features. Coordinates are arrays in longitude, latitude order with optional altitude. RFC 7946 fixes the coordinate reference system to WGS 84 in decimal degrees and removes the older, optional "crs" member — so a conforming file needs no projection metadata at all.

How widespread

GeoJSON is the default interchange format of the web mapping world, in the same way GPX is the default of the GPS world. Anything that draws a map in a browser will take it.

RouteConverter support

Reads GeoJSON
Writes GeoJSON

Specifications and documentation