GeoJSON explained

GeoJSON
Noextcode:on
Extensions:.json, .geojson
Nomimecode:on
Mime:application/geo+json
Genre:GIS file format
Extended From:JSON
Open:yes

GeoJSON[1] is an open standard format designed for representing simple geographical features, along with their non-spatial attributes. It is based on the JSON format.

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 GIS 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.

Example

Geometries

Points are [x, y] or [x, y, z]. They may be [longitude, latitude] or [eastings, northings]. Elevation, in meters,[6] is an optional third number. They are decimal numbers. [7]

For example, London (51.5074° North, 0.1278° West) is [-0.1278, 51.5074]

Geometry primitives
TypeExamples
Point
LineString
Polygon
Multipart geometries
TypeExamples
MultiPoint
MultiLineString
MultiPolygon
GeometryCollection

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.[8] 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.[9] 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 side JavaScript library to decode TopoJSON back to GeoJSON again. TopoJSON is also supported by the popular OGR tool as of version 1.11[10] and PostGIS as of version 2.1.0.[11]

TopoJSON Schema

Given a GIS shape near coordinates latitude 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:

See also

References

  1. 7946 . Butler . Howard . Daly . Martin . Doyle . Allan . Gillies . Sean . Hagen . Stefan . Schaub . Tim . August 2016 . .
  2. Web site: Providing Directions. developer.apple.com.
  3. Web site: GeoJSON Info Page. lists.geojson.org.
  4. Web site: The GeoJSON March 2007 Archive by thread. lists.geojson.org.
  5. Web site: Geographic JSON (geojson) -. datatracker.ietf.org.
  6. The GeoJSON Format . Butler . H. . Daly . M. . August 2016 . Internet Engineering Task Force . RFC 7946 . Doyle . A. . Gillies . Sean . Schaub . T. . Hagen . Stefan.
  7. Web site: GeoJSON RFC #3.1.1. August 2016 . Butler . H. . Daly . M. . Doyle . A. . Gillies . Sean . Schaub . T. . Hagen . Stefan .
  8. Web site: topojson/topojson-specification. 11 December 2020. GitHub.
  9. Web site: topojson/topojson. GitHub.
  10. Web site: Release/1.11.0-News – GDAL. trac.osgeo.org.
  11. Web site: AsTopoJSON. postgis.net.

Sources

External links