Show Menu
Cheatography

GeoJSON Cheat Sheet (DRAFT) by

GeoJSON summary, based on RFC 7946

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Useful links

RFC [EN]

Overview

Use
geospatial data interc­hange
Based on
JSON
Coordinate system
Word Geoedtic System (WGS 1984, EPSG:4326)
MIME
applic­ati­on/­geo­+json
File format type
GIS
Extensions
.json, .geojson
Coordinate format
Decimal degree (e.g. 104.0)

Position & Coordi­nates

What is the position?
The smallest unit that we can really consider ‘a place’ since it can represent a point on earth
What is a coordi­nate?
A single number repres­enting a single dimension.
How does a position look like?
An array of 2 or 3 coordi­nates (decimal float numbers)
The first is..?
Easting for projected coordi­nates, Longitude for geographic coordi­nates
.. and the second?
Northing for projected coordi­nates, Latitude for geographic coordi­nates
.. while the third (optional) is ..?
Altitude or Elevation

External members

bbox
 

Geometries

Name
Category
Children
Example
Point
single (primi­tive)
"­coo­rdi­nat­es": single position
{ 
  "type": "­Poi­nt",
  "coordinates": [100.0, 0.0]
}
LineString
single (primi­tive)
"­coo­rdi­nat­es": array of positions
{ 
  "type": "LineString",
  "coordinates": [
    [100.0, 0.0],
    [101.0, 1.0]
  ]
}
Polygon
single (primi­tive)
"­coo­rdi­nat­es": array of at least 4 closed LineStrings where the first element is the exterior ring, the other interior rings (or holes)
{ 
   "­typ­e": "­Pol­ygo­n",
   "­coo­rdi­nat­es": [
     [[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]],
     [[20, 30], [35, 35], [30, 20], [20, 30]] ]
}
MultiPoint
multipart
"­coo­rdi­nat­es": array of 2 or more positions
{ 
   "­typ­e": "­Mul­tiP­oin­t",
   "­coo­rdi­nat­es": [ [10, 40], [-10, 30], [120, -2] ]
}
MultiL­ine­String
multipart
"­coo­rdi­nat­es": array of LineString "­coo­rdi­nat­es" arrays
{ 
   "­typ­e": "MultiLineString",
  "coordinates": [ [ [100.0, 0.0], [101.0, 1.0] ], [ [102.0, 2.0], [103.0, 3.0] ] ] }
MultiP­olygon
multipart
"­coo­rdi­nat­es": array of Polygon "­coo­rdi­nat­es" arrays
{ 
   "­typ­e": "MultiPolygon",
  "coordinates": [ [ [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] ], [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], [ [100.2, 0.2], [100.2, 0.8], [100.8, 0.8], [100.8, 0.2], [100.2, 0.2] ] ] ] }
Geomet­ryC­oll­ection
collection
"­geo­met­rie­s": array of single or multipart geometries
{          "­typ­e": "­Geo­met­ryC­oll­ect­ion­",          "­geo­met­rie­s": [{              "­typ­e": "­Poi­nt",              "­coo­rdi­nat­es": [100.0, 0.0]          }, {              "­typ­e": "­Lin­eSt­rin­g",              "­coo­rdi­nat­es": [                  [101.0, 0.0],                  [102.0, 1.0]              ]          }]      }

GeoJSON Objects

Name
Properties
Example
Feature
"­­ge­o­m­et­­ry": geometry or null, "­­pr­o­p­er­­tie­­s": generic JSON or null
{ "­typ­e": "­Fea­tur­e", "­geo­met­ry": { "­typ­e": "­Poi­nt", "­coo­rdi­nat­es": [125.6, 10.1] }, "­pro­per­tie­s": { "­nam­e": "­Dinagat Island­s" } }
Featur­eCo­lle­ction
"­­ge­o­m­et­­rie­­s": array of single or multipart geometries
{ "­typ­e": "­Fea­tur­eCo­lle­cti­on", "­fea­tur­es": [ { "­typ­e": "­Fea­tur­e", "­geo­met­ry": { "­typ­e": "­Poi­nt", "­coo­rdi­nat­es": [102.0, 0.5] }, "­pro­per­tie­s": { "­pro­p0": "­val­ue0­" } }, { "­typ­e": "­Fea­tur­e", "­geo­met­ry": { "­typ­e": "­Lin­eSt­rin­g", "­coo­rdi­nat­es": [ [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0] ] }, "­pro­per­tie­s": { "­pro­p0": "­val­ue0­", "­pro­p1": 0.0 } }, { "­typ­e": "­Fea­tur­e", "­geo­met­ry": { "­typ­e": "­Pol­ygo­n", "­coo­rdi­nat­es": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] }, "­pro­per­tie­s": { "­pro­p0": "­val­ue0­", "­pro­p1": { "­thi­s": "­tha­t" } } } ] }