GeoJSON
Filename extension |
.json |
---|---|
Internet media type |
application/json |
Type of format | GIS file format |
Extended from | JSON |
Open format? | yes |
Website | geojson.org |
GeoJSON[1] is an open standard format for encoding collections of simple geographical features along with their non-spatial attributes using JavaScript Object Notation. The features include points (therefore addresses and locations), line strings (therefore streets, highways and boundaries), polygons (countries, provinces, tracts of land), and multi-part collections of these types. GeoJSON features need not represent entities of the physical world only; mobile routing and navigation apps, for example, might describe their service coverage using GeoJSON.[2]
The GeoJSON format differs from other GIS standards in that it was written and is maintained not by a formal standards organization, but by an Internet working group of developers.[3]
A notable offspring of GeoJSON is the TopoJSON format.
History
The GeoJSON format working group and discussion were begun in March 2007[4] and the format specification was finalized in June 2008.
Example
{ "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": { "prop1": 0.0, "prop0": "value0" } }, { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] }, "properties": { "prop1": { "this": "that" }, "prop0": "value0" } } ] }
Geometries
Type | Examples | |
---|---|---|
Point | { "type": "Point", "coordinates": [30, 10] } | |
LineString | { "type": "LineString", "coordinates": [ [30, 10], [10, 30], [40, 40] ] } | |
Polygon | { "type": "Polygon", "coordinates": [ [[30, 10], [40, 40], [20, 40], [10, 20], [30, 10]] ] } | |
{ "type": "Polygon", "coordinates": [ [[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]], [[20, 30], [35, 35], [30, 20], [20, 30]] ] } |
Type | Examples | |
---|---|---|
MultiPoint | { "type": "MultiPoint", "coordinates": [ [10, 40], [40, 30], [20, 20], [30, 10] ] } | |
MultiLineString | { "type": "MultiLineString", "coordinates": [ [[10, 10], [20, 20], [10, 40]], [[40, 40], [30, 30], [40, 20], [30, 10]] ] } | |
MultiPolygon | { "type": "MultiPolygon", "coordinates": [ [ [[30, 20], [45, 40], [10, 40], [30, 20]] ], [ [[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]] ] ] } | |
{ "type": "MultiPolygon", "coordinates": [ [ [[40, 40], [20, 45], [45, 30], [40, 40]] ], [ [[20, 35], [10, 30], [10, 10], [30, 5], [45, 20], [20, 35]], [[30, 20], [20, 15], [20, 25], [30, 20]] ] ] } |
Supported software
GeoJSON is supported by numerous mapping and GIS software packages, including OpenLayers,[5] Leaflet, Geoforge software,[6] GeoServer,[7] GeoDjango,[8] GDAL,[9] Safe Software FME,[10] and CartoDB,[11] It is also possible to use GeoJSON with PostGIS[12] and Mapnik,[13] both of which handle the format via the GDAL OGR conversion library. Bing Maps, Yahoo! and Google also support GeoJSON in their API services.
Google Maps integration is possible using libraries,[14] or by iterating through the data and instancing equivalent objects.
GitHub also supports GeoJSON rendering.[15]
References
- ↑ The GeoJSON Format Specification
- ↑ iOS Location and Maps Programming Guide
- ↑ The GeoJSON Discussion List
- ↑ March 2007 Archives by thread
- ↑ http://openlayers.org/dev/examples/vector-formats.html
- ↑ http://leafletjs.com/reference.html#geojson
- ↑ http://svn.codehaus.org/geoserver/tags/2.0.0-alpha1/geoserver/release/README.txt
- ↑ http://geodjango.org/docs/db-api.html
- ↑ http://gdal.org/ogr/drv_geojson.html
- ↑ http://www.safe.com/reader_writerPDF/geojson.pdf
- ↑ http://developers.cartodb.com/documentation/cartodb-js.html
- ↑ http://pugs.postgresql.org/files/Introduction_to_PostGIS_v1.0.pdf
- ↑ http://svn.mapnik.org/tags/release-0.6.0/docs/api_docs/python/mapnik-module.html
- ↑ https://github.com/JasonSanford/GeoJSON-to-Google-Maps
- ↑ https://github.com/blog/1528-there-s-a-map-for-that
Sources
- http://geojson.org/
- http://geojson.org/geojson-spec.html
- http://www.directionsmag.com/article.php?article_id=2550
- 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