Search notes:

GeoJSON

GeoJSON is an exchange format for geospatial data, based on JSON, hence the name.
The coordinate reference system of GeoJSON is the World Geodetic System 1984 with the values transmitted in decimal degrees.
Coordinates order is first longitude then latitude (which is the opposite of ISO 6709).
GeoJSON is primarily used for

GeoJSON types

GeoJSON defines seven geometry types, the Feature type and the FeatureCollection type.

Geometry types

Geometry objects represent
  • Zero dimensional points, or
  • One dimensional curves, or
  • Two dimensional surfaces
The Geometry types supported by GeoJSON are defined in the OpenGIS Simple Features Implementation Specification for SQL (SFSQL):
Value of coordinates member
Point A position (which is an array of coordinates)
LineString Array of two or more positions
Polygon Array of linear ring coordinate arrays
MultiPoint Array of positions
MultiLineString Array of LineString coordinate arrays
MultiPolygon Array of Polygon coordinate arrays
GeometryCollection n/a (has a geometries member instead which is a (possibly empty) array of geometry types).
The GeoJSON representation of the instances of these geometry types correspond to the binary (WKB) and text (WKT) representations as described in SFSQL.

Features and FeatureCollections

In addition to the geometry types, GeoJSON also defines the following types:
Feature A geometry object with addtional members
FeatureCollection A collection (array) of feature objects, analogous to that of the Web Feature Service (WFS) response to GetFeatures requests or to a Keyhole Markup Language (KML) folder of placemarks

Representation of GeoJSON objects

Each object is a JSON object.
A GeoJSON object has the member type whose value is a string and corresponds to one of the nine specified object types.
All GeoJSON geometry objects except GeometryCollection have a coordinates member.
An object can optionally have a bbox attribute which is an array of coordinates.
An object may also have other attributes.

Representation of a FeatureCollection

A FeatureCollection is an array of features.
Each feature has a geometric object, stored in the object named geometry.
Features have freely definable properties.
{ "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
                       }
      },
         …
  ]
}

Misc

The media type for GeoJSON is application/geo+json.
File extensions are .json and .geojson.
The Windows Clipboard name is GeoJSON.

TODO

GitHub renders GeoJSON files as a map.

See also

JSON
RFC 7946 The GeoJSON Format
The function geojson in the Oracle package dbms_json
Using osmtogeojson to convert an Overpass-API result to GeoJSON

Index