GeoJSON
Encyclopedia
GeoJSON is an open format for encoding a variety of geographic data structures.
It is so named because it is based on JSON
JSON
JSON , or JavaScript Object Notation, is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects...

 (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.

GeoJSON allows geographic data to be stored in a human-readable way that is generally more compact than XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

.

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
Geographic coordinate system
A geographic coordinate system is a coordinate system that enables every location on the Earth to be specified by a set of numbers. The coordinates are often chosen such that one of the numbers represent vertical position, and two or three of the numbers represent horizontal position...

, using the OGC
Open Geospatial Consortium
The Open Geospatial Consortium , an international voluntary consensus standards organization, originated in 1994. In the OGC, more than 400 commercial, governmental, nonprofit and research organizations worldwide collaborate in a consensus process encouraging development and implementation of open...

 crs (coordinate reference system) property (preferred) or with an EPSG code. If a crs is not defined, GeoJSON will use the WGS84 geoid
Geoid
The geoid is that equipotential surface which would coincide exactly with the mean ocean surface of the Earth, if the oceans were in equilibrium, at rest , and extended through the continents . According to C.F...

 by default.

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
OpenLayers
OpenLayers is an open source JavaScript library for displaying map data in web browsers. It provides an API for building rich web-based geographic applications similar to Google Maps and Bing Maps...

, GeoServer
GeoServer
In computing, GeoServer - an open-source server written in Java - allows users to share and edit geospatial data. Designed for interoperability, it publishes data from any major spatial data source using open standards...

, GeoDjango, GDAL
GDAL
GDAL is a library for reading and writing raster geospatial data formats, and is released under the permissive X/MIT style free software license by the Open Source Geospatial Foundation. As a library, it presents a single abstract data model to the calling application for all supported formats...

, and Safe Software
Safe Software
Safe Software Inc. provides software and consulting services focused on managing the exchange of both spatial and non-spatial data between GIS applications and/or relational databases with differing file formats and structures....

 FME
Feature Manipulation Engine
FME is an integrated collection of Spatial ETL tools for spatial data transformation and data translation produced by Safe Software Inc. of Surrey, British Columbia, Canada...

. It is also possible to use GeoJSON with PostGIS
PostGIS
PostGIS is an open source software program that adds support for geographic objects to the PostgreSQL object-relational database. PostGIS follows the Simple Features for SQL specification from the Open Geospatial Consortium .-Features:...

 and Mapnik
Mapnik
Mapnik is an open source mapping toolkit, written in C++ and useful for both desktop- and server-based map rendering. One of its many users is the OpenStreetMap project which uses it in combination with an Apache Web Server module to render tiles that make up the OSM 'Slippy Map' Layer...

, both of which handle the format via the GDAL OGR conversion library. Yahoo!
Yahoo!
Yahoo! Inc. is an American multinational internet corporation headquartered in Sunnyvale, California, United States. The company is perhaps best known for its web portal, search engine , Yahoo! Directory, Yahoo! Mail, Yahoo! News, Yahoo! Groups, Yahoo! Answers, advertising, online mapping ,...

 and Google
Google
Google Inc. is an American multinational public corporation invested in Internet search, cloud computing, and advertising technologies. Google hosts and develops a number of Internet-based services and products, and generates profit primarily from advertising through its AdWords program...

also support GeoJSON in their API services.

Sources

  • http://geojson.org/
  • http://geojson.org/geojson-spec.html
  • http://www.directionsmag.com/article.php?article_id=2550
  • http://www.bostongis.com/PrinterFriendly.aspx?content_name=sqlserver2008_postgis_mysql_compare
  • http://blog.programmableweb.com/2008/08/27/3-top-data-formats-for-map-mashups-kml-georss-and-geojson/
  • http://www.geowebguru.com/articles/97-technical-overview-geojson
  • http://googlegeodevelopers.blogspot.com/2009/05/build-on-top-of-your-public-latitude.html
  • http://www.springerlink.com/content/r38228t50x960168/
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK