The features include points (therefore addresses and locations), line strings (therefore streets, highways and boundaries), polygons (countries, provinces, tracts of land), and multi-part collections of these types. GeoJSON features need not represent entities of the physical world only; mobile routing and navigation apps, for example, might describe their service coverage using GeoJSON.[2]
The GeoJSON format differs from other geographic information system standards in that it was written and is maintained not by a formal standards organization, but by an Internet working group of developers.[3]
A notable offspring of GeoJSON is TopoJSON, an extension of GeoJSON that encodes geospatial topology and that typically provides smaller file sizes.
History
The GeoJSON format working group and discussion were begun in March 2007[4] and the format specification was finalized in June 2008.
In April 2015 the Internet Engineering Task Force founded the Geographic JSON working group[5] which released GeoJSON as RFC 7946 in August 2016.
An alternative to GeoJSON is to encode one geographic feature per line, with line breaks (or record-separator characters) designating the separation between records.
This format can be much faster more efficient to parse than normal GeoJSON, as tooling can read individual records in parallel. This format is similar to newline-delimited JSON
Variants of newline-delimited GeoJSON include:
GeoJSONSeq (short for GeoJSON Text Sequences) - with record-separator (RS) characters separating features[8]
GeoJSONL (short for GeoJSON Lines) - with newline characters separating features[9]
TopoJSON
TopoJSON is an extension of GeoJSON that encodes topology. Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called arcs.[10]Arcs are sequences of points, while line strings and polygons are defined as sequences of arcs. Each arc is defined only once, but can be referenced several times by different shapes, thus reducing redundancy and decreasing the file size.[11] In addition, TopoJSON facilitates applications that use topology, such as topology-preserving shape simplification, automatic map coloring, and cartograms.
A reference implementation of the TopoJSON specification is available as a command-line tool to encode TopoJSON from GeoJSON (or ESRI Shapefiles) and a client sideJavaScript library to decode TopoJSON back to GeoJSON again. TopoJSON is also supported by the popular OGR tool as of version 1.11[12] and PostGIS as of version 2.1.0.[13]
TopoJSON Schema
Given a GIS shape near coordinateslatitude 0° and longitude 0°, a simple but valid and complete topojson file containing all metadata, Polygon, LineString, Point elements, arcs and properties is defined as follows:
^Butler, H.; Daly, M.; Doyle, A.; Gillies, Sean; Schaub, T.; Hagen, Stefan (August 2016). The GeoJSON Format (Report). Internet Engineering Task Force.
^Butler, H.; Daly, M.; Doyle, A.; Gillies, Sean; Schaub, T.; Hagen, Stefan (August 2016). "GeoJSON RFC #3.1.1".
^Gillies, Sean (April 2017). GeoJSON Text Sequences (Report). Internet Engineering Task Force.