Skip to content

Instantly share code, notes, and snippets.

@jyutzler
Last active November 26, 2015 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jyutzler/da33f075ac416d0445e7 to your computer and use it in GitHub Desktop.
Save jyutzler/da33f075ac416d0445e7 to your computer and use it in GitHub Desktop.
A proposed extensions mechanism for GeoJSON

Extensions Object

A GeoJSON object MAY contain a member named Extensions which is an extensions object. An extensions object SHALL contain a set of key/value pairs describing the extensions in use in that GeoJSON object.

Key

The key is a machine-readable string that names the extension. A key SHOULD have a prefix that names the community responsible for naming the extension. A GeoJSON object SHOULD contain an extensions object to declare which extensions are in use. If a client supports one or more GeoJSON extensions, it SHOULD inspect the extensions object.

Value

The value is a human-readable string describing the extension. A value SHOULD contain a URL for a description of the extension.

Example

   {
       "type": "FeatureCollection",
       "extensions":{
           "jyutzler_extension": "A proposed extension for encoding extensions, 
           as described at https://gist.github.com/jyutzler/da33f075ac416d0445e7"
       },
       "features": [{
           "type": "Feature",
           "geometry": {
               "type": "Point",
               "coordinates": [102.0, 0.5]
           },
           "properties": {
               "prop0": "value0"
           }
       }]
   }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment