GeoJSON

GeoJSON is an open[1] format for encoding a variety of geographic data structures. It is so named because it is based on JSON (JavaScript Object Notation). In fact, every GeoJSON data structure is also a JSON object, and thus JSON tools can also be used for processing GeoJSON data.[2]

GeoJSON allows geographic data to be stored in a human-readable way that is generally more compact than XML.

Spatial data format types supported in GeoJSON include points, polygons, multipolygons, features, geometry collections, and bounding boxes, which are stored along with feature information and attributes. The geometries and their properties will have a parent object, such as a feature collection.

GeoJSON also allows specifying a geographic coordinate system, using the OGC crs (coordinate reference system) property (preferred) or with an EPSG code. If a crs is not defined, GeoJSON will use the WGS84 geoid by default.

Contents

History

The GeoJSON format specification was finalized in June 2008.

Example

 {
    "type":"Feature", 
    "id":"OpenLayers.Feature.Vector_314", 
    "properties":{}, 
    "geometry":{
        "type":"Point", 
        "coordinates":[97.03125, 39.7265625]
    }, 
    "crs":{
        "type":"OGC", 
        "properties":{
            "urn":"urn:ogc:def:crs:OGC:1.3:CRS84"
        }
    }
 }

Supported software

GeoJSON is supported by numerous mapping and GIS software packages, including OpenLayers,[3] GeoServer,[4] GeoDjango,[5] GDAL,[6] and Safe Software FME.[7] It is also possible to use GeoJSON with PostGIS[8] and Mapnik,[9] both of which handle the format via the GDAL OGR conversion library. Yahoo! and Google also support GeoJSON in their API services.

References

  1. ^ Augmented Reality: the magic problem - Wired
  2. ^ The GeoJSON Format Specification.
  3. ^ http://openlayers.org/dev/examples/vector-formats.html
  4. ^ http://svn.codehaus.org/geoserver/tags/2.0.0-alpha1/geoserver/release/README.txt
  5. ^ http://geodjango.org/docs/db-api.html
  6. ^ http://gdal.org/ogr/drv_geojson.html
  7. ^ http://www.safe.com/reader_writerPDF/geojson.pdf
  8. ^ http://pugs.postgresql.org/files/Introduction_to_PostGIS_v1.0.pdf
  9. ^ http://svn.mapnik.org/tags/release-0.6.0/docs/api_docs/python/mapnik-module.html

Sources