fbpx
Wikipedia

GeoJSON

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.

GeoJSON
Filename extensions.json, .geojson
Internet media typeapplication/geo+json[1]
Type of formatGIS file format
Extended fromJSON
StandardRFC 7946
Open format?yes
Websitegeojson.org

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 edit

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 edit

{  "type": "FeatureCollection",  "features": [  {  "type": "Feature",  "geometry": {  "type": "Point",  "coordinates": [102.0, 0.5]  },  "properties": {  "prop0": "value0"  }  },  {  "type": "Feature",  "geometry": {  "type": "LineString",  "coordinates": [  [102.0, 0.0],  [103.0, 1.0],  [104.0, 0.0],  [105.0, 1.0]  ]  },  "properties": {  "prop0": "value0",  "prop1": 0.0  }  },  {  "type": "Feature",  "geometry": {  "type": "Polygon",  "coordinates": [  [  [100.0, 0.0],  [101.0, 0.0],  [101.0, 1.0],  [100.0, 1.0],  [100.0, 0.0]  ]  ]  },  "properties": {  "prop0": "value0",  "prop1": { "this": "that" }  }  }  ] } 

Geometries edit

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

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

Geometry primitives
Type Examples
Point  
{  "type": "Point",   "coordinates": [30.0, 10.0] } 
LineString  
{  "type": "LineString",   "coordinates": [  [30.0, 10.0],  [10.0, 30.0],  [40.0, 40.0]  ] } 
Polygon  
{  "type": "Polygon",   "coordinates": [  [  [30.0, 10.0],  [40.0, 40.0],  [20.0, 40.0],  [10.0, 20.0],  [30.0, 10.0]  ]  ] } 
 
{  "type": "Polygon",   "coordinates": [  [  [35.0, 10.0],  [45.0, 45.0],  [15.0, 40.0],  [10.0, 20.0],  [35.0, 10.0]  ],  [  [20.0, 30.0],  [35.0, 35.0],  [30.0, 20.0],  [20.0, 30.0]  ]  ] } 
Multipart geometries
Type Examples
MultiPoint  
{  "type": "MultiPoint",   "coordinates": [  [10.0, 40.0],  [40.0, 30.0],  [20.0, 20.0],  [30.0, 10.0]  ] } 
MultiLineString  
{  "type": "MultiLineString",   "coordinates": [  [  [10.0, 10.0],  [20.0, 20.0],  [10.0, 40.0]  ],  [  [40.0, 40.0],  [30.0, 30.0],  [40.0, 20.0],  [30.0, 10.0]  ]  ] } 
MultiPolygon  
{  "type": "MultiPolygon",   "coordinates": [  [  [   [30.0, 20.0],   [45.0, 40.0],   [10.0, 40.0],   [30.0, 20.0]  ]  ],   [  [   [15.0, 5.0],   [40.0, 10.0],   [10.0, 20.0],   [5.0, 10.0],   [15.0, 5.0]  ]  ]  ] } 
 
{  "type": "MultiPolygon",   "coordinates": [  [  [   [40.0, 40.0],   [20.0, 45.0],   [45.0, 30.0],   [40.0, 40.0]  ]  ],   [  [   [20.0, 35.0],   [10.0, 30.0],   [10.0, 10.0],   [30.0, 5.0],   [45.0, 20.0],   [20.0, 35.0]  ],  [   [30.0, 20.0],   [20.0, 15.0],   [20.0, 25.0],   [30.0, 20.0]  ]  ]  ] } 
GeometryCollection  
{  "type": "GeometryCollection",  "geometries": [  {  "type": "Point",  "coordinates": [40.0, 10.0]  },  {  "type": "LineString",  "coordinates": [   [10.0, 10.0],   [20.0, 20.0],   [10.0, 40.0]  ]  },  {  "type": "Polygon",  "coordinates": [   [   [40.0, 40.0],   [20.0, 45.0],   [45.0, 30.0],   [40.0, 40.0]   ]  ]  }  ] } 

TopoJSON edit

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.[7] 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.[8] 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[9] and PostGIS as of version 2.1.0.[10]

TopoJSON Schema edit

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:

 
Topojson shapes
{  "type":"Topology",  "transform":{  "scale": [1,1],  "translate": [0,0]  },  "objects":{   "two-squares":{  "type": "GeometryCollection",  "geometries":[  {"type": "Polygon", "arcs":[[0,1]],"properties": {"name": "Left_Polygon" }},  {"type": "Polygon", "arcs":[[2,-1]],"properties": {"name": "Right_Polygon" }}  ]  },  "one-line": {  "type":"GeometryCollection",  "geometries":[  {"type": "LineString", "arcs": [3],"properties":{"name":"Under_LineString"}}  ]  },  "two-places":{  "type":"GeometryCollection",  "geometries":[  {"type":"Point","coordinates":[0,0],"properties":{"name":"Origine_Point"}},  {"type":"Point","coordinates":[0,-1],"properties":{"name":"Under_Point"}}  ]  }  },  "arcs": [  [[1,2],[0,-2]],  [[1,0],[-1,0],[0,2],[1,0]],  [[1,2],[1,0],[0,-2],[-1,0]],  [[0,-1],[2,0]]  ] } 

See also edit

References edit

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

Sources edit

  • Andrews, Christopher (18 September 2007). . Archived from the original on 22 May 2009.
  • . 16 February 2009. Archived from the original on 21 February 2009.
  • Lambert, Chris (4 May 2009). "Google Geo Developers Blog: Build on top of your public Latitude location with GeoJSON & KML".

External links edit

  • Official website
  • https://geojsonlint.com
  • topojson/topojson

geojson, open, standard, format, designed, representing, simple, geographical, features, along, with, their, spatial, attributes, based, json, format, filename, extensions, json, geojsoninternet, media, typeapplication, json, type, formatgis, file, formatexten. 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 GeoJSONFilename extensions json geojsonInternet media typeapplication geo json 1 Type of formatGIS file formatExtended fromJSONStandardRFC 7946Open format yesWebsitegeojson wbr org 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 Contents 1 History 2 Example 2 1 Geometries 3 TopoJSON 3 1 TopoJSON Schema 4 See also 5 References 6 Sources 7 External linksHistory editThe 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 edit type FeatureCollection features type Feature geometry type Point coordinates 102 0 0 5 properties prop0 value0 type Feature geometry type LineString coordinates 102 0 0 0 103 0 1 0 104 0 0 0 105 0 1 0 properties prop0 value0 prop1 0 0 type Feature geometry type Polygon coordinates 100 0 0 0 101 0 0 0 101 0 1 0 100 0 1 0 100 0 0 0 properties prop0 value0 prop1 this that Geometries edit Points are x y or x y z They may be longitude latitude or eastings northings Elevation is an optional third number They are decimal numbers 6 For example London 51 5074 North 0 1278 West is 0 1278 51 5074 Geometry primitives Type Examples Point nbsp type Point coordinates 30 0 10 0 LineString nbsp type LineString coordinates 30 0 10 0 10 0 30 0 40 0 40 0 Polygon nbsp type Polygon coordinates 30 0 10 0 40 0 40 0 20 0 40 0 10 0 20 0 30 0 10 0 nbsp type Polygon coordinates 35 0 10 0 45 0 45 0 15 0 40 0 10 0 20 0 35 0 10 0 20 0 30 0 35 0 35 0 30 0 20 0 20 0 30 0 Multipart geometries Type Examples MultiPoint nbsp type MultiPoint coordinates 10 0 40 0 40 0 30 0 20 0 20 0 30 0 10 0 MultiLineString nbsp type MultiLineString coordinates 10 0 10 0 20 0 20 0 10 0 40 0 40 0 40 0 30 0 30 0 40 0 20 0 30 0 10 0 MultiPolygon nbsp type MultiPolygon coordinates 30 0 20 0 45 0 40 0 10 0 40 0 30 0 20 0 15 0 5 0 40 0 10 0 10 0 20 0 5 0 10 0 15 0 5 0 nbsp type MultiPolygon coordinates 40 0 40 0 20 0 45 0 45 0 30 0 40 0 40 0 20 0 35 0 10 0 30 0 10 0 10 0 30 0 5 0 45 0 20 0 20 0 35 0 30 0 20 0 20 0 15 0 20 0 25 0 30 0 20 0 GeometryCollection nbsp type GeometryCollection geometries type Point coordinates 40 0 10 0 type LineString coordinates 10 0 10 0 20 0 20 0 10 0 40 0 type Polygon coordinates 40 0 40 0 20 0 45 0 45 0 30 0 40 0 40 0 TopoJSON editTopoJSON 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 7 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 8 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 9 and PostGIS as of version 2 1 0 10 TopoJSON Schema edit 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 nbsp Topojson shapes type Topology transform scale 1 1 translate 0 0 objects two squares type GeometryCollection geometries type Polygon arcs 0 1 properties name Left Polygon type Polygon arcs 2 1 properties name Right Polygon one line type GeometryCollection geometries type LineString arcs 3 properties name Under LineString two places type GeometryCollection geometries type Point coordinates 0 0 properties name Origine Point type Point coordinates 0 1 properties name Under Point arcs 1 2 0 2 1 0 1 0 0 2 1 0 1 2 1 0 0 2 1 0 0 1 2 0 See also editGeography Markup Language GIS vector file formatReferences edit a b Butler Howard Daly Martin Doyle Allan Gillies Sean Hagen Stefan Schaub Tim August 2016 RFC 7946 IETF doi 10 17487 RFC7946 Providing Directions developer apple com GeoJSON Info Page lists geojson org The GeoJSON March 2007 Archive by thread lists geojson org Geographic JSON geojson datatracker ietf org Butler H Daly M Doyle A Gillies Sean Schaub T Hagen Stefan August 2016 GeoJSON RFC 3 1 1 topojson topojson specification 11 December 2020 via GitHub topojson topojson GitHub Release 1 11 0 News GDAL trac osgeo org AsTopoJSON postgis net Sources editAndrews Christopher 18 September 2007 Emerging Technology AJAX and GeoJSON Archived from the original on 22 May 2009 Geoweb Guru Technical Overview GeoJSON 16 February 2009 Archived from the original on 21 February 2009 Lambert Chris 4 May 2009 Google Geo Developers Blog Build on top of your public Latitude location with GeoJSON amp KML External links editOfficial website https geojsonlint com topojson topojson Retrieved from https en wikipedia org w index php title GeoJSON amp oldid 1210694214, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.