HOME

TheInfoList



OR:

GeoJSON is an
open standard An open standard is a standard that is openly accessible and usable by anyone. It is also a common prerequisite that open standards use an open license that provides for extensibility. Typically, anybody can participate in their development due to ...
format designed for representing simple geographical features, along with their non-spatial attributes. It is based on the
JSON JSON (JavaScript Object Notation, pronounced or ) is an open standard file format and electronic data interchange, data interchange format that uses Human-readable medium and data, human-readable text to store and transmit data objects consi ...
format. The features include points (therefore addresses and locations), line strings (therefore streets, highways and boundaries),
polygon In geometry, a polygon () is a plane figure made up of line segments connected to form a closed polygonal chain. The segments of a closed polygonal chain are called its '' edges'' or ''sides''. The points where two edges meet are the polygon ...
s (countries, provinces, tracts of land), and multi-part collections of these types. GeoJSON features are not limited to representing entities of the physical world only; mobile routing and navigation apps, for example, might describe their service coverage using GeoJSON. The GeoJSON format differs from other
geographic information system A geographic information system (GIS) consists of integrated computer hardware and Geographic information system software, software that store, manage, Spatial analysis, analyze, edit, output, and Cartographic design, visualize Geographic data ...
standards in that it was written and is maintained not by a formal standards organization, but by an Internet working group of developers. 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 and the format specification was finalized in June 2008. In April 2015 the
Internet Engineering Task Force The Internet Engineering Task Force (IETF) is a standards organization for the Internet standard, Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster ...
founded the ''Geographic JSON working group'' which released GeoJSON as RFC 7946 in August 2016.


Example

,


Geometries

Points are
, y The comma is a punctuation mark that appears in several variants in different languages. Some typefaces render it as a small line, slightly curved or straight, but inclined from the vertical; others give it the appearance of a miniature fille ...
or , y, z They may be ongitude, latitudeor astings, northings Elevation, in meters, is an optional third number. They are decimal numbers. For example, London (51.5074° North, 0.1278° West) is 0.1278, 51.5074 The coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system, using the
World Geodetic System The World Geodetic System (WGS) is a standard used in cartography, geodesy, and satellite navigation including GPS. The current version, WGS 84, defines an Earth-centered, Earth-fixed coordinate system and a geodetic datum, and also describ ...
1984 (WGS 84) GS84datum, with longitude and latitude units of decimal degrees.


Newline-delimited GeoJSON

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 * GeoJSONL (short for GeoJSON Lines) - with newline characters separating features


TopoJSON

TopoJSON is an extension of GeoJSON that encodes
topology Topology (from the Greek language, Greek words , and ) is the branch of mathematics concerned with the properties of a Mathematical object, geometric object that are preserved under Continuous function, continuous Deformation theory, deformat ...
. Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called ''arcs''. ''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. In addition, TopoJSON facilitates applications that use topology, such as topology-preserving shape simplification, automatic map coloring, and
cartogram A cartogram (also called a value-area map or an anamorphic map, the latter common among German-speakers) is a thematic map of a set of features (countries, provinces, etc.), in which their geographic size is altered to be Proportionality (math ...
s. 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 A JavaScript library is a library of pre-written JavaScript code that allows for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. They can be included in a website by embedding it directl ...
to decode TopoJSON back to GeoJSON again. TopoJSON is also supported by the popular OGR tool as of version 1.11 and PostGIS as of version 2.1.0.


TopoJSON Schema

Given a GIS shape near
coordinates In geometry, a coordinate system is a system that uses one or more numbers, or coordinates, to uniquely determine and standardize the Position (geometry), position of the Point (geometry), points or other geometric elements on a manifold such as ...
latitude In geography, latitude is a geographic coordinate system, geographic coordinate that specifies the north-south position of a point on the surface of the Earth or another celestial body. Latitude is given as an angle that ranges from −90° at t ...
0° and
longitude Longitude (, ) is a geographic coordinate that specifies the east- west position of a point on the surface of the Earth, or another celestial body. It is an angular measurement, usually expressed in degrees and denoted by the Greek lett ...
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

* Geography Markup Language (GML) * GIS vector file format * Keyhole Markup Language (KML)


References


Sources

* * *


External links

* {{Official website, https://geojson.org
https://geojson.io

https://geojsonlint.com

topojson/topojson
JSON GIS vector file formats Open formats