Skip to main content

GeoJSON Geometry

GeoJSON geometries can sometimes be useful independently of GeoJSON.

Examples

  {
"type": "Point",
"coordinates": [102.0, 0.5]
},
  {
"type": "LineString",
"coordinates": [
[102.0, 0.0],
[103.0, 1.0],
[104.0, 0.0],
[105.0, 1.0]
]
},
  {
"type": "Polygon",
"coordinates": [
[
[100.0, 0.0],
[101.0, 0.0],
[101.0, 1.0],
[100.0, 1.0],
[100.0, 0.0]
]
]
}

Alternatives

FormatNotes
WKBBinary, more compact
WKTText based, slightly more compact, a bit harder to parse (not JSON)
GML GeometryXML based, even more verbose, more complex to parse