http://wiki.geojson.org/api.php?action=feedcontributions&user=Mpd&feedformat=atomGeoJSON - User contributions [en]2024-03-28T18:30:49ZUser contributionsMediaWiki 1.26.3http://wiki.geojson.org/index.php?title=Users&diff=252Users2013-01-25T19:27:35Z<p>Mpd: /* Servers */</p>
<hr />
<div>== Libaries ==<br />
<br />
* OpenLayers [http://openlayers.org/dev/examples/vector-formats.html Demo]<br />
* OGR [http://gdal.org/ogr/drv_geojson.html GeoJSON Driver Information]<br />
* MapFish<br />
** [http://www.mapfish.org/svn/mapfish/contribs/java-geojson Java implementation]<br />
** [http://www.mapfish.org/svn/mapfish/contribs/php-geojson PHP implementation]<br />
* geojson Python Library, http://pypi.python.org/pypi/geojson/1.0.1/ <br />
* Shapely (GeoJSON Geometries) <br />
* [http://rubyforge.org/projects/georuby/ GeoRuby]<br />
<br />
== Servers ==<br />
<br />
* [http://featureserver.org/ FeatureServer] [http://featureserver.org/featureserver.cgi/scribble?maxfeatures=1 Example]<br />
* [http://geoserver.org GeoServer]<br />
* [http://crschmidt.net/mapping/wpsdemo/ WPServer] [http://crschmidt.net/mapping/wpserverdemo/webprocessingserver/wps.cgi/buffer.geojson?buffer=2&data=POINT(0%200) Example]<br />
* GeoDjango<br />
* ArcDeveloper Project [http://groups.google.com/group/arcdeveloper-dev Google Group]<br />
* [http://www.mapbender.org Mapbender]<br />
* Pleiades?<br />
* Knowhere? I Think. <br />
* [http://geocommons.com GeoCommons] (formerly [http://mapufacture.com Mapufacture]) [http://geocommons.com/help/Geocommons_API Developers API]<br />
* CubeSERV WFS from [http://www.cubewerx.com CubeWerx Inc.] ([http://www.pvretano.com/cwwfs/cubeserv2.cgi?datastore=Foundation&service=WFS&version=1.1.0&request=GetFeature&typeName=INWATERA_1M&outputFormat=JSON&maxFeatures=10 example])<br />
* [http://www.mapfish.org MapFish]<br />
* [http://www.cadcorp.com Cadcorp GeognoSIS]<br />
* [http://www.caris.com/products/sfe/SFE-Server CARIS Spatial Fusion Enterprise Server]<br />
* [http://simplegeo.com SimpleGeo]<br />
* [http://Twitter.com Twitter]<br />
* [http://docs.mongodb.org/manual/release-notes/2.4/#new-geospatial-indexes-with-geojson-and-improved-spherical-geometry MongoDB 2.4]<br />
<br />
== Desktop Apps ==<br />
<br />
* [http://www.safe.com/fme FME]<br />
* [http://www.cadcorp.com Cadcorp SIS] ([[:Image:Cadcorp_SIS_GeoJSON_Plugin.png|screenshot]])<br />
* Arc2Earth, according to http://tinyurl.com/2oo5o8 <br />
<br />
== Web Services ==<br />
<br />
* [http://www.geotruc.net/ geo:truc]<br />
* [http://fireeagle.yahoo.net FireEagle]<br />
<br />
== Spatial Databases ==<br />
<br />
* [http://www.postgis.org PostGIS (since version 1.3.4)]<br />
* [http://www.downloadplex.com/Linux/Developer-Tools/Components-Libraries/sdo_146802.html Oracle Spatial (third party implementation)]</div>Mpdhttp://wiki.geojson.org/index.php?title=Users&diff=246Users2009-10-01T12:32:38Z<p>Mpd: </p>
<hr />
<div>== Libaries ==<br />
<br />
* OpenLayers [http://openlayers.org/dev/examples/vector-formats.html Demo]<br />
* OGR [http://gdal.org/ogr/drv_geojson.html GeoJSON Driver Information]<br />
* MapFish<br />
** [https://trac.mapfish.org/trac/mapfish/ticket/73 Java implementation?]<br />
** [http://mapfish.org/svn/mapfish/trunk/MapFish/server/php/ PHP implementation]<br />
* geojson Python Library, http://pypi.python.org/pypi/geojson/1.0 <br />
* Shapely (GeoJSON Geometries) <br />
* [http://rubyforge.org/projects/georuby/ GeoRuby]<br />
<br />
== Servers ==<br />
<br />
* [http://featureserver.org/ FeatureServer] [http://featureserver.org/featureserver.cgi/scribble?maxfeatures=1 Example]<br />
* [http://geoserver.org GeoServer]<br />
* [http://crschmidt.net/mapping/wpsdemo/ WPServer] [http://crschmidt.net/mapping/wpserverdemo/webprocessingserver/wps.cgi/buffer.geojson?buffer=2&data=POINT(0%200) Example]<br />
* GeoDjango<br />
* ArcDeveloper Project [http://groups.google.com/group/arcdeveloper-dev Google Group]<br />
* [http://www.mapbender.org Mapbender]<br />
* Pleiades?<br />
* Knowhere? I Think. <br />
* [http://mapufacture.com Mapufacture] - [http://mapufacture.com/about/developers Developers API]<br />
* CubeSERV WFS from [http://www.cubewerx.com CubeWerx Inc.] ([http://www.pvretano.com/cwwfs/cubeserv.cgi?datastore=TEST&service=WFS&version=1.1.0&request=GetFeature&typeName=AEROFACP_1M&outputFormat=JSON&maxFeatures=10 example])<br />
* [http://www.mapfish.org MapFish]<br />
* [http://www.cadcorp.com Cadcorp GeognoSIS]<br />
* [http://www.caris.com/products/sfe/SFE-Server CARIS Spatial Fusion Enterprise Server]<br />
<br />
== Desktop Apps ==<br />
<br />
* [http://www.safe.com/fme FME]<br />
* [http://www.cadcorp.com Cadcorp SIS] ([[:Image:Cadcorp_SIS_GeoJSON_Plugin.png|screenshot]])<br />
* Arc2Earth, according to http://tinyurl.com/2oo5o8 <br />
<br />
== Web Services ==<br />
<br />
* [http://www.geotruc.net/ geo:truc]<br />
* [http://fireeagle.yahoo.net FireEagle]<br />
<br />
== Spatial Databases ==<br />
<br />
* [http://www.postgis.org PostGIS (since version 1.3.4)]<br />
* [http://www.downloadplex.com/Linux/Developer-Tools/Components-Libraries/sdo_146802.html Oracle Spatial (third party implementation)]</div>Mpdhttp://wiki.geojson.org/index.php?title=Users&diff=245Users2009-07-09T08:07:26Z<p>Mpd: </p>
<hr />
<div>Libaries: <br />
* OpenLayers [http://openlayers.org/dev/examples/vector-formats.html Demo]<br />
* OGR [http://gdal.org/ogr/drv_geojson.html GeoJSON Driver Information]<br />
* MapFish<br />
** [https://trac.mapfish.org/trac/mapfish/ticket/73 Java implementation?]<br />
** [http://mapfish.org/svn/mapfish/trunk/MapFish/server/php/ PHP implementation]<br />
* geojson Python Library, http://pypi.python.org/pypi/geojson/1.0 <br />
* Shapely (GeoJSON Geometries) <br />
* [http://rubyforge.org/projects/georuby/ GeoRuby]<br />
<br />
Servers: <br />
* [http://featureserver.org/ FeatureServer] [http://featureserver.org/featureserver.cgi/scribble?maxfeatures=1 Example]<br />
* [http://geoserver.org GeoServer]<br />
* [http://crschmidt.net/mapping/wpsdemo/ WPServer] [http://crschmidt.net/mapping/wpserverdemo/webprocessingserver/wps.cgi/buffer.geojson?buffer=2&data=POINT(0%200) Example]<br />
* GeoDjango<br />
* ArcDeveloper Project [http://groups.google.com/group/arcdeveloper-dev Google Group]<br />
* [http://www.mapbender.org Mapbender]<br />
* Pleiades?<br />
* Knowhere? I Think. <br />
* [http://mapufacture.com Mapufacture] - [http://mapufacture.com/about/developers Developers API]<br />
* CubeSERV WFS from [http://www.cubewerx.com CubeWerx Inc.] ([http://www.pvretano.com/cwwfs/cubeserv.cgi?datastore=TEST&service=WFS&version=1.1.0&request=GetFeature&typeName=AEROFACP_1M&outputFormat=JSON&maxFeatures=10 example])<br />
* [http://www.mapfish.org MapFish]<br />
<br />
Desktop Apps: <br />
* [http://www.safe.com/fme FME]<br />
* [http://www.cadcorp.com Cadcorp SIS] ([[:Image:Cadcorp_SIS_GeoJSON_Plugin.png|screenshot]])<br />
* Arc2Earth, according to http://tinyurl.com/2oo5o8 <br />
<br />
Web Services: <br />
* [http://www.geotruc.net/ geo:truc]<br />
* [http://fireeagle.yahoo.net FireEagle]<br />
<br />
Spatial Databases:<br />
* [http://www.postgis.org PostGIS (since version 1.3.4)]<br />
* [http://www.downloadplex.com/Linux/Developer-Tools/Components-Libraries/sdo_146802.html Oracle Spatial (third party implementation)]</div>Mpdhttp://wiki.geojson.org/index.php?title=URL_Encoded_Data&diff=244URL Encoded Data2009-01-09T07:17:02Z<p>Mpd: </p>
<hr />
<div>URL Encoded Data is a Javascript library for converting an array into a URL. This could be useful for passing geographic requests using GeoJSON arrays.<br />
<br />
<code><pre><br />
//The JS Array format of the example given above<br />
var arr = {<br />
'name':"Binny",<br />
'year':2007,<br />
'quote':"Hello, World!",<br />
'os':['Windows','Linux','Mac'],<br />
'software':{<br />
'editor':"vi",<br />
'audio':"xmms",<br />
'video':"vlc"<br />
}<br />
}<br />
var data = ued_encode(arr);<br />
</pre></code><br />
<br />
Results in:<br />
<br />
<code><pre><br />
http://www.example.com/get_data.php?name=Binny&year=2007&<br />
quote=Hello%2C+World%21&os[]=Windows&os[]=Linux&os[]=Mac&<br />
software[editor]=vi&software[audio]=xmms&software[video]=vlc<br />
</pre></code><br />
<br />
[http://ajaxian.com/archives/ued-url-encoded-data Ajaxian: UED - URL Encoded Data]</div>Mpdhttp://wiki.geojson.org/index.php?title=Main_Page&diff=243Main Page2009-01-09T07:16:39Z<p>Mpd: </p>
<hr />
<div>== Draft Specification ==<br />
<br />
*[[GeoJSON_draft_version_5]]<br />
<br />
*[[GeoJSON_draft_version_6]]<br />
<br />
== GeoJSON ==<br />
<br />
* [[What_is_JSON%3F|What is JSON?]]<br />
* [[What_is_GeoJSON%3F|What is GeoJSON?]]<br />
<br />
== Example Implementations ==<br />
<br />
* [http://openlayers.org/dev/examples/vector-formats.html GeoJSON in OpenLayers]<br />
* [http://docs.codehaus.org/display/GEOSDOC/GeoJSON+Output+Format GeoJSON plug-in for GeoServer]<br />
* [http://exportgge.sourceforge.net/kml/ GeoJSON plug-in for CartoWeb]<br />
* [http://gdal.org/ogr/drv_geojson.html GeoJSON in GDAL/OGR]<br />
<br />
== Discussion list ==<br />
<br />
* [http://lists.geojson.org/listinfo.cgi/geojson-geojson.org http://lists.geojson.org/listinfo.cgi/geojson-geojson.org]<br />
<br />
== IRC ==<br />
<br />
* [irc://irc.freenode.net/#geojson #geojson] channel on irc.freenode.net<br />
<br />
== Draft History ==<br />
<br />
*[[RFC-001]] (Deprecated)<br />
*[[RFC-2]] (Moved to [[GeoJSON_1.0_RC_1]] )<br />
<br />
== Other ==<br />
* [[URL_Encoded_Data|URL Encoded Data (UED)]]<br />
* [http://www.geonames.org/export/JSON-webservices.html Geonames JSON Webservices]<br />
* [http://www.google.com/apis/maps/documentation/#Geocoding_Structured Google's Geocoder JSON Response]</div>Mpdhttp://wiki.geojson.org/index.php?title=URL_Encoded_Data&diff=236URL Encoded Data2009-01-08T19:07:15Z<p>Mpd: </p>
<hr />
<div>URL Encoded Data is a Javascript library for converting an array into a URL. This could be useful for passing geographic requests using GeoJSON arrays.<br />
<br />
<code><pre><br />
//The JS Array format of the example given above<br />
var arr = {<br />
'name':"Binny",<br />
'year':2007,<br />
'quote':"Hello, World!",<br />
'os':['Windows','Linux','Mac'],<br />
'software':{<br />
'editor':"vi",<br />
'audio':"xmms",<br />
'video':"vlc"<br />
}<br />
}<br />
var data = ued_encode(arr);<br />
</pre></code><br />
<br />
Results in:<br />
<br />
<code><pre><br />
http://www.example.com/get_data.php?name=Binny&year=2007&<br />
quote=Hello%2C+World%21&os[]=Windows&os[]=Linux&os[]=Mac&<br />
software[editor]=vi&software[audio]=xmms&software[video]=vlc<br />
</pre></code><br />
<br />
[http://ajaxian.com/archives/ued-url-encoded-data Ajaxian: UED - URL Encoded Data]</div>Mpdhttp://wiki.geojson.org/index.php?title=Main_Page&diff=235Main Page2009-01-08T19:05:30Z<p>Mpd: </p>
<hr />
<div>== Draft Specification ==<br />
<br />
*[[GeoJSON_draft_version_5]]<br />
<br />
*[[GeoJSON_draft_version_6]]<br />
<br />
== GeoJSON ==<br />
<br />
* [[What_is_JSON%3F|What is JSON?]]<br />
* [[What_is_GeoJSON%3F|What is GeoJSON?]]<br />
<br />
== Example Implementations ==<br />
<br />
* [http://openlayers.org/dev/examples/vector-formats.html GeoJSON in OpenLayers]<br />
* [http://docs.codehaus.org/display/GEOSDOC/GeoJSON+Output+Format GeoJSON plug-in for GeoServer]<br />
* [http://exportgge.sourceforge.net/kml/ GeoJSON plug-in for CartoWeb]<br />
* [http://gdal.org/ogr/drv_geojson.html GeoJSON in GDAL/OGR]<br />
<br />
== Discussion list ==<br />
<br />
* [http://lists.geojson.org/listinfo.cgi/geojson-geojson.org http://lists.geojson.org/listinfo.cgi/geojson-geojson.org]<br />
<br />
== IRC ==<br />
<br />
* [irc://irc.freenode.net/#geojson #geojson] channel on irc.freenode.net<br />
<br />
== Draft History ==<br />
<br />
*[[RFC-001]] (Deprecated)<br />
*[[RFC-2]] (Moved to [[GeoJSON_1.0_RC_1]] )<br />
<br />
== Other ==<br />
* [[URL_Encoded_Data|URL Encoded Data (UED)]]<br />
* [http://www.geonames.org/export/JSON-webservices.html Geonames JSON Webservices]<br />
* [http://www.google.com/apis/maps/documentation/#Geocoding_Structured Google's Geocoder JSON Response]</div>Mpdhttp://wiki.geojson.org/index.php?title=URL_Encoded_Data&diff=231URL Encoded Data2008-12-31T08:04:51Z<p>Mpd: </p>
<hr />
<div>URL Encoded Data is a Javascript library for converting an array into a URL. This could be useful for passing geographic requests using GeoJSON arrays.<br />
<br />
<code><pre><br />
//The JS Array format of the example given above<br />
var arr = {<br />
'name':"Binny",<br />
'year':2007,<br />
'quote':"Hello, World!",<br />
'os':['Windows','Linux','Mac'],<br />
'software':{<br />
'editor':"vi",<br />
'audio':"xmms",<br />
'video':"vlc"<br />
}<br />
}<br />
var data = ued_encode(arr);<br />
</pre></code><br />
<br />
Results in:<br />
<br />
<code><pre><br />
http://www.example.com/get_data.php?name=Binny&year=2007&<br />
quote=Hello%2C+World%21&os[]=Windows&os[]=Linux&os[]=Mac&<br />
software[editor]=vi&software[audio]=xmms&software[video]=vlc<br />
</pre></code><br />
<br />
[http://ajaxian.com/archives/ued-url-encoded-data Ajaxian: UED - URL Encoded Data]</div>Mpdhttp://wiki.geojson.org/index.php?title=Main_Page&diff=229Main Page2008-12-19T08:03:01Z<p>Mpd: </p>
<hr />
<div>== Draft Specification ==<br />
<br />
*[[GeoJSON_draft_version_5]]<br />
<br />
*[[GeoJSON_draft_version_6]]<br />
<br />
== GeoJSON ==<br />
<br />
* [[What_is_JSON%3F|What is JSON?]]<br />
* [[What_is_GeoJSON%3F|What is GeoJSON?]]<br />
<br />
== Example Implementations ==<br />
<br />
* [http://openlayers.org/dev/examples/vector-formats.html GeoJSON in OpenLayers]<br />
* [http://docs.codehaus.org/display/GEOSDOC/GeoJSON+Output+Format GeoJSON plug-in for GeoServer]<br />
* [http://exportgge.sourceforge.net/kml/ GeoJSON plug-in for CartoWeb]<br />
* [http://gdal.org/ogr/drv_geojson.html GeoJSON in GDAL/OGR]<br />
<br />
== Discussion list ==<br />
<br />
* [http://lists.geojson.org/listinfo.cgi/geojson-geojson.org http://lists.geojson.org/listinfo.cgi/geojson-geojson.org]<br />
<br />
== IRC ==<br />
<br />
* [irc://irc.freenode.net/#geojson #geojson] channel on irc.freenode.net<br />
<br />
== Draft History ==<br />
<br />
*[[RFC-001]] (Deprecated)<br />
*[[RFC-2]] (Moved to [[GeoJSON_1.0_RC_1]] )<br />
<br />
== Other ==<br />
* [[URL_Encoded_Data|URL Encoded Data (UED)]]<br />
* [http://www.geonames.org/export/JSON-webservices.html Geonames JSON Webservices]<br />
* [http://www.google.com/apis/maps/documentation/#Geocoding_Structured Google's Geocoder JSON Response]</div>Mpdhttp://wiki.geojson.org/index.php?title=Users&diff=215Users2008-03-31T09:54:49Z<p>Mpd: </p>
<hr />
<div>Libaries: <br />
* OpenLayers [http://openlayers.org/dev/examples/vector-formats.html Demo]<br />
* OGR [http://gdal.org/ogr/drv_geojson.html GeoJSON Driver Information]<br />
* MapFish Java implementation? https://trac.mapfish.org/trac/mapfish/ticket/73 <br />
* GeoJSON Python Library, http://pypi.python.org/pypi/GeoJSON/1.0a3 <br />
* Shapely (GeoJSON Geometries) <br />
* [http://rubyforge.org/projects/georuby/ GeoRuby]<br />
<br />
Servers: <br />
* [http://featureserver.org/ FeatureServer] [http://featureserver.org/featureserver.cgi/scribble?maxfeatures=1 Example]<br />
* [http://geoserver.org GeoServer]<br />
* [http://crschmidt.net/mapping/wpsdemo/ WPServer] [http://crschmidt.net/mapping/wpserverdemo/webprocessingserver/wps.cgi/buffer.geojson?buffer=2&data=POINT(0%200) Example]<br />
* ArcDeveloper Project [http://groups.google.com/group/arcdeveloper-dev Google Group]<br />
* MapBender <br />
* Pleiades?<br />
* Knowhere? I Think. <br />
* [http://mapufacture.com Mapufacture] - [http://mapufacture.com/about/developers Developers API]<br />
* CubeSERV WFS from [http://www.cubewerx.com CubeWerx Inc.] ([http://www.pvretano.com/cwwfs/cubeserv.cgi?datastore=TEST&service=WFS&version=1.1.0&request=GetFeature&typeName=AEROFACP_1M&outputFormat=JSON&maxFeatures=10 example])<br />
* [http://www.mapfish.org MapFish]<br />
<br />
Desktop Apps: <br />
* [http://www.safe.com/fme FME]<br />
* [http://www.cadcorp.com Cadcorp SIS] ([[:Image:Cadcorp_SIS_GeoJSON_Plugin.png|screenshot]])<br />
* Arc2Earth, according to http://tinyurl.com/2oo5o8 <br />
<br />
Web Services: <br />
* [http://www.geotruc.net/ geo:truc]<br />
* [http://fireeagle.yahoo.net FireEagle]</div>Mpdhttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_6&diff=212GeoJSON draft version 62008-03-20T14:49:51Z<p>Mpd: Deleted out-of-date CRS examples section (examples are in the Specification section now)</p>
<hr />
<div>== Overview ==<br />
<br />
GeoJSON is a data-interchange format for a variety of geographic data structures. GeoJSON can be used to represent a geometry, a feature, a collection of geometries, or a collection of features. The geometry types supported in GeoJSON are Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon and GeometryCollection. Features in GeoJSON are geometry objects with additional properties. A geometry collection represents a list of geometries and a feature collection represents a list of features.<br />
<br />
A complete GeoJSON data structure is always an object (in JSON terms). In GeoJSON, an ''object'' consists of a collection of name/value pairs - also called ''members''. For each ''member'', the name is always a ''string''. Member ''values'' are either a ''string'', ''number'', ''object'', ''array'' or one of the literals: '''true''', '''false''', and '''null'''. An ''array'' consists of elements where each element is a ''value'' as described above. <br />
<br />
== Definitions ==<br />
<br />
* JavaScript Object Notation (JSON), and the terms object, name, value, array, and number, are defined at http://json.org/<br />
* The terms may, should, and must are defined at http://www.ietf.org/rfc/rfc2119.txt<br />
<br />
== Specification ==<br />
<br />
# GeoJSON always consists of a single object. This object (referred to as the GeoJSON object below) represents a geometry, feature, collection of geometries, or collection of features.<br />
# The GeoJSON object may have any number of members (name/value pairs).<br />
# The GeoJSON object must have a member with the name "type". This member's value is a string that determines the type of the GeoJSON object.<br />
## The value of the type member must be one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", "GeometryCollection", "Feature", or "FeatureCollection". "type" must be lower case, the case of the type member values must be as shown here.<br />
## A geometry is a GeoJSON object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "GeometryCollection". The case of the type member values must be as shown here.<br />
### A GeoJSON geometry object of any type other than "GeometryCollection" must have a member with the name "coordinates". The value of the coordinates member is always an array (referred to as the coordinates array below). The structure for the elements in this array are determined by the type of geometry.<br />
#### For type "Point", each element in the coordinates array is a number representing the point coordinate in one dimension. There must be at least two elements, and may be more. The order of elements must follow x, y, z order (or longitude, latitude, altitude for coordinates in a geographic coordinate reference system). Any number of additional dimensions are allowed, and interpretation and meaning of these coordinates is beyond the scope of this specification.<br />
#### For type "MultiPoint", each element in the coordinates array is a coordinates array as described for type "Point".<br />
#### For type "LineString", each element in the coordinates array is a coordinates array as described for type "Point". The coordinates array for a LineString must have two or more elements. A LinearRing is a special case of type LineString where the first and last elements in the coordinates array are equivalent (they represent equivalent points). Though a LinearRing is not explicitly represented as a GeoJSON geometry type, it is referred to in the Polygon geometry type definition.<br />
#### For type "MultiLineString", each element in the coordinates array is a coordinates array as described for type "LineString".<br />
#### For type "Polygon", each element in the coordinates array is a coordinates array as described for type "LineString". Furthermore, each LineString in the coordinates array must be a LinearRing. For Polygons with multiple LinearRings, the first must be the exterior ring and any others must be interior rings or holes.<br />
#### For type "MultiPolygon", each element in the coordinates array is a coordinates array as described for type "Polygon".<br />
### A GeoJSON geometry object with type "GeometryCollection" is a geometry object which represents a collection of geometry objects.<br />
#### A geometry collection must have a member with the name "geometries". The value corresponding to "geometries" is an array. Each element in this array is a GeoJSON geometry object.<br />
## A GeoJSON object with the type "Feature" represents a geometry with additional properties (referred to as a feature object below). <br />
### A feature object must have a member with the name "geometry". The value of the geometry member is a geometry object as defined above or a JSON null value (as in <code>{"type":"Feature", "properties": {"title":"empty"}, "geometry":null}</code>).<br />
### A feature object must have a member with the name "properties". The value of the properties member is an object (any JSON object).<br />
## A GeoJSON object with the type "FeatureCollection" represents a collection of feature objects.<br />
### An object of type "FeatureCollection" must have a member with the name "features". The value corresponding to "features" is an array. Each element in the array is a feature object as defined above.<br />
# '''''Coordinate Reference Systems''''': The coordinate reference system (CRS) of a GeoJSON object is determined by its "crs" member. If an object has no "crs" member, its parent object's "crs" member may be acquired. If no CRS can be so acquired, the default CRS shall apply to the GeoJSON object.<br />
## '''Default coordinate reference system''': The default is a geographic coordinate reference system, using the WGS84 datum, and with longitude and latitude units of decimal degrees.<br />
## '''The "crs" member''': The value of a member named "crs" must be an object (referred to as the CRS object below) or null. If the value of CRS is null, it means that no CRS can be assumed.<br />
### '''The CRS object''': A CRS object has 2 mandatory members: "type", and "properties".<br />
### ''The "type" member'': The value of this required member must be a string, indicating one of the 2 types of CRS objects: "name" or "link".<br />
### ''The "properties" member'': The value of this required member must be an object.<br />
## '''CRS object types''': There are 2 types of CRS objects.<br />
### ''Named'': A CRS object may indicate a coordinate reference system by name. The value of its "properties" member must be an object containing a "name" member. The value of that "name" member must be a string identifying a coordinate reference systems. OGC CRS URNs such as "urn:ogc:def:crs:OGC:1.3:CRS84" shall be preferred over legacy identifiers such as "EPSG:4326".<br />
#### Example:<pre>"crs": {"type": "name", "properties": {"name": "urn:ogc:def:crs:OGC:1.3:CRS84"}}</pre><br />
### ''Linked'': A CRS object may link to CRS parameters on the Web. In this case the value of its "properties" member must be a Link object (see below).<br />
#### ''The Link object'': A link object has 1 required member: "href", and 1 optional member: "type". The link object is similar to Atom/HTML/RSS links.<br />
##### The "href" member: The value of this required member must be a dereferenceable URI.<br />
##### The "type" member: The value of this optional member must be a string that hints at the format used to represent CRS parameters at the provided URI. Suggested values are: "proj4", "ogcwkt", "esriwkt", though others can be used.<br />
#### Example:<pre>"crs": {"type": "link", "properties": {"href": "http://example.com/crs/42", "type": "proj4"}}</pre>Relative links may be used to direct processors to CRS parameters in an auxiliary file:<pre>"crs": {"type": "link", "properties": {"href": "data.prj", "type": "proj4"}}</pre><br />
<br />
== Examples ==<br />
Each of the examples below represents a complete GeoJSON object. Note that unquoted whitespace is not significant in JSON. Whitespace is used in the examples to help illustrate the data structures - though it is not required.<br />
<br />
=== Geometries ===<br />
==== Point ====<br />
Point coordinates are in x, y order (longitude, latitude for geographic coordinates).<br />
{<br />
"type": "Point",<br />
"coordinates": [100.0, 0.0]<br />
}<br />
<br />
==== LineString ====<br />
Coordinates of LineString are an array of Point coordinates.<br />
{<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
}<br />
<br />
==== Polygon ====<br />
Coordinates of a Polygon are an array of LinearRing coordinates (LineString coordinates where the first and last points are equivalent). The first element in the array represents the exterior ring. Any subsequent elements represent interior rings (or holes).<br />
<br />
No holes<br />
{<br />
"type": "Polygon",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]<br />
]<br />
}<br />
With holes<br />
{<br />
"type": "Polygon",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],<br />
[ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]<br />
]<br />
}<br />
<br />
==== MultiPoint ====<br />
Coordinates of a MultiPoint are an array of Point coordinates.<br />
{<br />
"type": "MultiPoint",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
}<br />
<br />
==== MultiLineString ====<br />
Coordinates of a MultiLineString are an array of LineString coordinates.<br />
{<br />
"type": "MultiLineString",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 1.0] ],<br />
[ [102.0, 2.0], [103.0, 3.0] ]<br />
]<br />
}<br />
<br />
==== MultiPolygon ====<br />
Coordinates of a MultiPolygon are an array of Polygon coordinates.<br />
{<br />
"type": "MultiPolygon",<br />
"coordinates": [<br />
[<br />
[ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ]<br />
],<br />
[<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],<br />
[ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]<br />
]<br />
]<br />
}<br />
<br />
==== GeometryCollection ====<br />
Each element in the geometries array of a GeometryCollection is one of the geometry objects described above.<br />
{<br />
"type": "GeometryCollection",<br />
"geometries": [<br />
{<br />
"type": "Point",<br />
"coordinates": [100.0, 0.0]<br />
},<br />
{<br />
"type": "LineString",<br />
"coordinates": [<br />
[101.0, 0.0], [102.0, 1.0]<br />
]<br />
}<br />
]<br />
}<br />
<br />
=== Feature ===<br />
A Feature is an object with a geometry and additional properties.<br />
{<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
<br />
<br />
Since a GeometryCollection is a geometry type, you can use one inside a Feature:<br />
<br />
{<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "GeometryCollection",<br />
"geometries": [<br />
{<br />
"type": "Point",<br />
"coordinates": [100.0, 0.0]<br />
},<br />
{<br />
"type": "LineString",<br />
"coordinates": [<br />
[101.0, 0.0], [102.0, 1.0]<br />
]<br />
}<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
<br />
=== FeatureCollection ===<br />
Each element in the features array of a FeatureCollection is a Feature object as described above.<br />
{<br />
"type": "FeatureCollection",<br />
"features": [<br />
{<br />
"type": "Feature",<br />
"id": "id0",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
},<br />
{<br />
"type": "Feature",<br />
"id": "id1",<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": [<br />
[<br />
[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]<br />
]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
]<br />
}<br />
<br />
Same feature collection, with a member named "crs" to represent the coordinate reference system. Note that because this example uses EPSG:4326, it must specify coordinate_order, since EPSG:4326 defines the coordinate order to be "lat, lon", which is the opposite of the GeoJSON default.<br />
<br />
{<br />
"type": "FeatureCollection",<br />
"crs": {<br />
"type": "EPSG",<br />
"properties": { <br />
"code": 4326,<br />
"coordinate_order": [1, 0]<br />
}<br />
},<br />
"features": [<br />
{<br />
"type": "Feature",<br />
"id": "id0",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
},<br />
{<br />
"type": "Feature",<br />
"id": "id1",<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": [<br />
[<br />
[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]<br />
]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
]<br />
}<br />
<br />
=== Including additional members ===<br />
GeoJSON allows additional members at any level in a GeoJSON object (as described in point 2 in the specification). <br />
<br />
For example, if you are constructing a Feature type object, three members are required (named "type", "geometry", and "properties"). In addition to these three members, you may add any additional members. The example below adds a member named "foo" with the value "bar".<br />
{<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
},<br />
"foo": "bar"<br />
}<br />
<br />
If you are working with a data standard that uses namespaces, you can handle those by taking advantage of these extra members. For example, adding a member with the name "@namespaces" is valid in GeoJSON:<br />
<br />
{<br />
"@namespaces": {"":"http://geojson.org/ns#"},<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
<br />
Additionally, since all unicode characters are allowed in member names, the following object (with a member named "atom:summary" is valid GeoJSON).<br />
<br />
{<br />
"@namespaces": {"":"http://geojson.org/ns#", "atom":"http://www.w3.org/2005/Atom"},<br />
"@type": "atom:item",<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"atom:summary": "Some GeoJSON Content",<br />
"atom:description": "This content is also valid GeoJDIL."<br />
}<br />
}<br />
<br />
=== Including Bounding Box/Envelope ===<br />
<br />
To include information on the coordinate range for geometries, features, or feature collections, it is suggested that member named bbox be included in a GeoJSON object. The value of the bbox member should be a 2*n item array where n is the number of dimensions represented in the contained geometries and lowest values for all axes are followed by highest values. Axes order of a bbox follows axes order of geometries. In addition, the spatial reference for the bbox is assumed to match the spatial reference for the GeoJSON object of which it is a member.<br />
<br />
Example of a bbox member on a polygon geometry<br />
{ <br />
"bbox": [-180, -90, 180, 90],<br />
"type": "Polygon",<br />
"coordinates": [<br />
[ [-180, 10], [20, 90], [180, -5], [-30, -90] ]<br />
]<br />
}<br />
<br />
Example of a bbox member on a feature collection (with a bbox on each feature as well)<br />
{<br />
"type": "FeatureCollection",<br />
"bbox": [100, 0, 105, 1],<br />
"features": [<br />
{<br />
"type": "Feature",<br />
"id": "id0",<br />
"bbox": [102, 0, 105, 1],<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
},<br />
{<br />
"type": "Feature",<br />
"id": "id1",<br />
"bbox": [100, 0, 101, 1],<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": [<br />
[<br />
[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]<br />
]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
]<br />
}<br />
<br />
=== Using with non-geographic elements === <br />
GeoJSON is not a format in itself, but a specification for adding geometry to JSON elements. Therefore, it is possible to GeoJSON within a broader JSON document that has mixed elements - for example a blog.<br />
<br />
{<br />
"blog" : {<br />
"posts" : [<br />
{<br />
"type" : "atom:item",<br />
"atom:summary": "post 1",<br />
"atom:description" : "i love blogging"},<br />
{<br />
"type" : "atom:item",<br />
"atom:summary": "post 2 from CA",<br />
"atom:description" : "geoblogging in California"<br />
"location" : {<br />
"type", "Point",<br />
"coordinates": [-120, 40]<br />
}<br />
},<br />
],<br />
"location" : {<br />
"type", "Polygon",<br />
"coordinates": [[[-121, 39], [-119, 39], [-119, 41], [-121, 41], [-121, 39]]]<br />
}<br />
}<br />
}<br />
}<br />
<br />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Martin Daly<br />
* Sean Gillies<br />
* Andrew Turner</div>Mpdhttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_5&diff=193GeoJSON draft version 52008-03-11T08:07:33Z<p>Mpd: Fixed typo, plus other minor edits</p>
<hr />
<div>== Overview ==<br />
<br />
GeoJSON is a data-interchange format for a variety of geographic data structures. GeoJSON can be used to represent a geometry, a feature, a collection of geometries, or a collection of features. The geometry types supported in GeoJSON are Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon and GeometryCollection. Features in GeoJSON are geometry objects with additional properties. A geometry collection represents a list of geometries and a feature collection represents a list of features.<br />
<br />
A complete GeoJSON data structure is always an object (in JSON terms). In GeoJSON, an ''object'' consists of a collection of name/value pairs - also called ''members''. For each ''member'', the name is always a ''string''. Member ''values'' are either a ''string'', ''number'', ''object'', ''array'' or one of the literals: '''true''', '''false''', and '''null'''. An ''array'' consists of elements where each element is a ''value'' as described above. <br />
<br />
== Definitions ==<br />
<br />
* JavaScript Object Notation (JSON), and the terms object, name, value, array, and number, are defined at http://json.org/<br />
* The terms may, should, and must are defined at http://www.ietf.org/rfc/rfc2119.txt<br />
<br />
== Specification ==<br />
<br />
# GeoJSON always consists of a single object. This object (referred to as the GeoJSON object below) represents a geometry, feature, collection of geometries, or collection of features.<br />
# The GeoJSON object may have any number of members (name/value pairs).<br />
# The GeoJSON object must have a member with the name "type". This member's value is a string that determines the type of the GeoJSON object.<br />
## The value of the type member must be one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", "GeometryCollection", "Feature", or "FeatureCollection". "type" must be lower case, the case of the type member values must be as shown here.<br />
## A geometry is a GeoJSON object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "GeometryCollection". The case of the type member values must be as shown here.<br />
### A GeoJSON geometry object of any type other than "GeometryCollection" must have a member with the name "coordinates". The value of the coordinates member is always an array (referred to as the coordinates array below). The structure for the elements in this array are determined by the type of geometry.<br />
#### For type "Point", each element in the coordinates array is a number representing the point coordinate in one dimension. There must be at least two elements, and may be more. The order of elements must follow x, y, z order (or longitude, latitude, altitude for coordinates in a geographic coordinate reference system). Any number of additional dimensions are allowed, and interpretation and meaning of these coordinates is beyond the scope of this specification.<br />
#### For type "MultiPoint", each element in the coordinates array is a coordinates array as described for type "Point".<br />
#### For type "LineString", each element in the coordinates array is a coordinates array as described for type "Point". The coordinates array for a LineString must have two or more elements. A LinearRing is a special case of type LineString where the first and last elements in the coordinates array are equivalent (they represent equivalent points). Though a LinearRing is not explicitly represented as a GeoJSON geometry type, it is referred to in the Polygon geometry type definition.<br />
#### For type "MultiLineString", each element in the coordinates array is a coordinates array as described for type "LineString".<br />
#### For type "Polygon", each element in the coordinates array is a coordinates array as described for type "LineString". Furthermore, each LineString in the coordinates array must be a LinearRing. For Polygons with multiple LinearRings, the first must be the exterior ring and any others must be interior rings or holes.<br />
#### For type "MultiPolygon", each element in the coordinates array is a coordinates array as described for type "Polygon".<br />
### A GeoJSON geometry object with type "GeometryCollection" is a geometry object which represents a collection of geometry objects.<br />
#### A geometry collection must have a member with the name "geometries". The value corresponding to "geometries" is an array. Each element in this array is a GeoJSON geometry object.<br />
## A GeoJSON object with the type "Feature" represents a geometry with additional properties (referred to as a feature object below). <br />
### A feature object must have a member with the name "geometry". The value of the geometry member is a geometry object as defined above or a JSON null value (as in <code>{"type":"Feature", "properties": {"title":"empty"}, "geometry":null}</code>).<br />
### A feature object must have a member with the name "properties". The value of the properties member is an object (any JSON object).<br />
## A GeoJSON object with the type "FeatureCollection" represents a collection of feature objects.<br />
### An object of type "FeatureCollection" must have a member with the name "features". The value corresponding to "features" is an array. Each element in the array is a feature object as defined above.<br />
# A GeoJSON object without a member named "crs" contains geometries in a geographic coordinate reference system, using the WGS84 datum, and with units in decimal degrees. A GeoJSON object may have a member with the name "crs". If a GeoJSON object has a member named "crs", it is assumed to represent the coordinate reference system of the included geometry or geometries.<br />
## The value of a member named "crs" must be an object (referred to as the CRS object below). This object must have at least two named members: "type" and "properties". It may have an additional named member named "coordinate_order".<br />
### The value of the member named "type" must be a string.<br />
### The value of the member named "properties" must be an object. This specification defines no further requirements for the structure of these objects. Instead, a convention is offered.<br />
#### To use EPSG codes to describe coordinate reference system, the "crs" member should have the following structure: <code>"crs": {"type": "EPSG", "properties": {"code": 2805}}</code>. "crs", "type", and "properties" must be lower case. When used as a value, "EPSG" must be upper case. If the CRS object represents a coordinate reference system that defines a different coordinate order than GeoJSON (x, y, with optional additional dimensions), then the CRS object must include a member named "coordinate_order" - see point below about coordinate_order.<br />
#### To use an OGC URN (http://portal.opengeospatial.org/files/?artifact_id=16339) as a unique identifier of a coordinate reference system, the "crs" member should have the following structure:<br />
##### The value of the "type" member must be "OGC".<br />
##### The properties member must be an object with one member, "urn", that specifies an OGC URN such as "urn:ogc:def:crs:OGC:1.3:CRS84".<br />
##### The URN "urn:ogc:def:crs:OGC:1.3:CRS84" should be used in place of EPSG:4326 to indicate decimal degrees using the WGS84 datum in lon, lat order: the CRS object in this case would look like: <code>{"type":"OGC", "properties": {"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}</code><br />
##### Unless your data falls under one of the exceptions above, you should prefer EPSG codes to OGC URNs.<br />
#### To use a URL as a unique identifier to a coordinate reference system, the "crs" member should have the following structure: <br />
##### The properties object should contain one member: "url", that specifies a URL for the spatial reference that can be dereferenced by the client. <br />
##### An optional member, "type", is recommended, specifying the type of information available at the URL. This may be any string: suggestions are "proj4", "ogcwkt", "esriwkt", though others can be used. Applications may use this "type" member to determine the type of information that is available at the URL.<br />
##### The specification does not offer any information on how to convert this URL into a spatial reference system: use is only intended to provide users the ability to define their references outside the EPSG namespace.<br />
### If included, the value of the "coordinate_order" member is an array (referred to as the coordinate_order array). The number of values in the coordinate_order array must be equal to the number of items in the coordinate arrays within children of the parent of the CRS object. This array defines a mapping from CRS coordinate ordering to GeoJSON ordering (which must be in x, y, z order and may have optional additional dimensions). Not including a member named "coordinate_order" is equivalent to including the following: <code>"coordinate_order": [0, 1]</code> (for x, y coordinates) or <code>"coordinate_order": [0, 1, 2]</code> (for x, y, z coordinates).<br />
#### The CRS object must include a coordinate_order member if the CRS-defined axes order is not lon, lat (for a geographic crs) or easting, northing (for a projected crs). For example, data that references EPSG:4326 for its CRS would require a CRS object like so: <code>"crs": {"type": "EPSG", "properties": {"code": 4326}, "coordinate_order": [1, 0]}</code><br />
<br />
== Examples ==<br />
Each of the examples below represents a complete GeoJSON object. Note that unquoted whitespace is not significant in JSON. Whitespace is used in the examples to help illustrate the data structures - though it is not required.<br />
<br />
=== Geometries ===<br />
==== Point ====<br />
Point coordinates are in x, y order (longitude, latitude for geographic coordinates).<br />
{<br />
"type": "Point",<br />
"coordinates": [100.0, 0.0]<br />
}<br />
<br />
==== LineString ====<br />
Coordinates of LineString are an array of Point coordinates.<br />
{<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
}<br />
<br />
==== Polygon ====<br />
Coordinates of a Polygon are an array of LinearRing coordinates (LineString coordinates where the first and last points are equivalent). The first element in the array represents the exterior ring. Any subsequent elements represent interior rings (or holes).<br />
<br />
No holes<br />
{<br />
"type": "Polygon",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]<br />
]<br />
}<br />
With holes<br />
{<br />
"type": "Polygon",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],<br />
[ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]<br />
]<br />
}<br />
<br />
==== MultiPoint ====<br />
Coordinates of a MultiPoint are an array of Point coordinates.<br />
{<br />
"type": "MultiPoint",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
}<br />
<br />
==== MultiLineString ====<br />
Coordinates of a MultiLineString are an array of LineString coordinates.<br />
{<br />
"type": "MultiLineString",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 1.0] ],<br />
[ [102.0, 2.0], [103.0, 3.0] ]<br />
]<br />
}<br />
<br />
==== MultiPolygon ====<br />
Coordinates of a MultiPolygon are an array of Polygon coordinates.<br />
{<br />
"type": "MultiPolygon",<br />
"coordinates": [<br />
[<br />
[ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ]<br />
],<br />
[<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],<br />
[ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]<br />
]<br />
]<br />
}<br />
<br />
==== GeometryCollection ====<br />
Each element in the geometries array of a GeometryCollection is one of the geometry objects described above.<br />
{<br />
"type": "GeometryCollection",<br />
"geometries": [<br />
{<br />
"type": "Point",<br />
"coordinates": [100.0, 0.0]<br />
},<br />
{<br />
"type": "LineString",<br />
"coordinates": [<br />
[101.0, 0.0], [102.0, 1.0]<br />
]<br />
}<br />
]<br />
}<br />
<br />
=== Feature ===<br />
A Feature is an object with a geometry and additional properties.<br />
{<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
<br />
<br />
Since a GeometryCollection is a geometry type, you can use one inside a Feature:<br />
<br />
{<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "GeometryCollection",<br />
"geometries": [<br />
{<br />
"type": "Point",<br />
"coordinates": [100.0, 0.0]<br />
},<br />
{<br />
"type": "LineString",<br />
"coordinates": [<br />
[101.0, 0.0], [102.0, 1.0]<br />
]<br />
}<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
<br />
=== FeatureCollection ===<br />
Each element in the features array of a FeatureCollection is a Feature object as described above.<br />
{<br />
"type": "FeatureCollection",<br />
"features": [<br />
{<br />
"type": "Feature",<br />
"id": "id0",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
},<br />
{<br />
"type": "Feature",<br />
"id": "id1",<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": [<br />
[<br />
[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]<br />
]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
]<br />
}<br />
<br />
Same feature collection, with a member named "crs" to represent the coordinate reference system. Note that because this example uses EPSG:4326, it must specify coordinate_order, since EPSG:4326 defines the coordinate order to be "lat, lon", which is the opposite of the GeoJSON default.<br />
<br />
{<br />
"type": "FeatureCollection",<br />
"crs": {<br />
"type": "EPSG",<br />
"properties": { <br />
"code": 4326,<br />
"coordinate_order": [1, 0]<br />
}<br />
},<br />
"features": [<br />
{<br />
"type": "Feature",<br />
"id": "id0",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
},<br />
{<br />
"type": "Feature",<br />
"id": "id1",<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": [<br />
[<br />
[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]<br />
]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
]<br />
}<br />
<br />
=== CRS Examples ===<br />
The specification defines a number of different ways of encoding CRS. Here are some examples of how to use these:<br />
<br />
...<br />
"crs": {<br />
"type": "EPSG",<br />
"properties": { <br />
"code": 4326,<br />
"coordinate_order": [1, 0]<br />
}<br />
}<br />
...<br />
<br />
...<br />
"crs": {<br />
"type": "EPSG",<br />
"properties": { <br />
"code": 2805<br />
}<br />
}<br />
...<br />
<br />
...<br />
"crs": {<br />
"type": "URL",<br />
"properties": { <br />
"url": "http://spatialreference.org/ref/epsg/2001/proj4/",<br />
"type": "proj4"<br />
}<br />
}<br />
...<br />
<br />
=== Including additional members ===<br />
GeoJSON allows additional members at any level in a GeoJSON object (as described in point 2 in the specification). <br />
<br />
For example, if you are constructing a Feature type object, three members are required (named "type", "geometry", and "properties"). In addition to these three members, you may add any additional members. The example below adds a member named "foo" with the value "bar".<br />
{<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
},<br />
"foo": "bar"<br />
}<br />
<br />
If you are working with a data standard that uses namespaces, you can handle those by taking advantage of these extra members. For example, adding a member with the name "@namespaces" is valid in GeoJSON:<br />
<br />
{<br />
"@namespaces": {"":"http://geojson.org/ns#"},<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
<br />
Additionally, since all unicode characters are allowed in member names, the following object (with a member named "atom:summary" is valid GeoJSON).<br />
<br />
{<br />
"@namespaces": {"":"http://geojson.org/ns#", "atom":"http://www.w3.org/2005/Atom"},<br />
"@type": "atom:item",<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"atom:summary": "Some GeoJSON Content",<br />
"atom:description": "This content is also valid GeoJDIL."<br />
}<br />
}<br />
<br />
=== Including Bounding Box/Envelope ===<br />
<br />
To include information on the coordinate range for geometries, features, or feature collections, it is suggested that member named bbox be included in a GeoJSON object. The value of the bbox member should be a 2*n item array where n is the number of dimensions represented in the contained geometries and lowest values for all axes are followed by highest values. Axes order of a bbox follows axes order of geometries. In addition, the spatial reference for the bbox is assumed to match the spatial reference for the GeoJSON object of which it is a member.<br />
<br />
Example of a bbox member on a polygon geometry<br />
{ <br />
"bbox": [-180, -90, 180, 90],<br />
"type": "Polygon",<br />
"coordinates": [<br />
[ [-180, 10], [20, 90], [180, -5], [-30, -90] ]<br />
]<br />
}<br />
<br />
Example of a bbox member on a feature collection (with a bbox on each feature as well)<br />
{<br />
"type": "FeatureCollection",<br />
"bbox": [100, 0, 105, 1],<br />
"features": [<br />
{<br />
"type": "Feature",<br />
"id": "id0",<br />
"bbox": [102, 0, 105, 1],<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
},<br />
{<br />
"type": "Feature",<br />
"id": "id1",<br />
"bbox": [100, 0, 101, 1],<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": [<br />
[<br />
[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]<br />
]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
]<br />
}<br />
<br />
=== Using with non-geographic elements === <br />
GeoJSON is not a format in itself, but a specification for adding geometry to JSON elements. Therefore, it is possible to GeoJSON within a broader JSON document that has mixed elements - for example a blog.<br />
<br />
{<br />
"blog" : {<br />
"posts" : [<br />
{<br />
"type" : "atom:item",<br />
"atom:summary": "post 1",<br />
"atom:description" : "i love blogging"},<br />
{<br />
"type" : "atom:item",<br />
"atom:summary": "post 2 from CA",<br />
"atom:description" : "geoblogging in California"<br />
"location" : {<br />
"type", "Point",<br />
"coordinates": [-120, 40]<br />
}<br />
},<br />
],<br />
"location" : {<br />
"type", "Polygon",<br />
"coordinates": [[[-121, 39], [-119, 39], [-119, 41], [-121, 41], [-121, 39]]]<br />
}<br />
}<br />
}<br />
}<br />
<br />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Martin Daly<br />
* Christopher Schmidt<br />
* Sean Gillies<br />
* Andrew Turner</div>Mpdhttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_5&diff=151GeoJSON draft version 52007-10-01T16:23:20Z<p>Mpd: Added some missing "GeometryCollection"-s and definition of MultiLineString coordinates; reworded crs section to clarify axes order issues (also apply to projected crs-s); added OGC URN reference</p>
<hr />
<div>== Overview ==<br />
<br />
GeoJSON is a data-interchange format for a variety of geographic data structures. GeoJSON can be used to represent a geometry, a feature, a collection of geometries, or a collection of features. The geometry types supported in GeoJSON are Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection, and Box. Features in GeoJSON are geometry objects with additional properties. A geometry collection represents a list of geometries and a feature collection represents a list of features.<br />
<br />
A complete GeoJSON data structure is always an object (in JSON terms). In GeoJSON, an ''object'' consists of a collection of name/value pairs - also called ''members''. For each ''member'', the name is always a ''string''. Member ''values'' are either a ''string'', ''number'', ''object'', ''array'' or one of the literals: '''true''', '''false''', and '''null'''. An ''array'' consists of elements where each element is a ''value'' as described above. <br />
<br />
== Definitions ==<br />
<br />
* JavaScript Object Notation (JSON), and the terms object, name, value, array, and number, are defined at http://json.org/<br />
* The terms may, should, and must are defined at http://www.ietf.org/rfc/rfc2119.txt<br />
<br />
== Specification ==<br />
<br />
# GeoJSON always consists of a single object. This object (referred to as the GeoJSON object below) represents a geometry, feature, collection of geometries, or collection of features.<br />
# The GeoJSON object may have any number of members (name/value pairs).<br />
# The GeoJSON object must have a member with the name "type". This member's value is a string that determines the type of the GeoJSON object.<br />
## The value of the type member must be one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", "GeometryCollection", "Box", "Feature", or "FeatureCollection". "type" must be lower case, the case of the type member values must be as shown here.<br />
## A geometry is a GeoJSON object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", "GeometryCollection", or "Box". The case of the type member values must be as shown here.<br />
### In addition to the type member, a GeoJSON object that represents a geometry (referred to as a geometry object below) must have a member with the name "coordinates". The value of the coordinates member is always an array (referred to as the coordinates array below). The structure for the elements in this array are determined by the type of geometry.<br />
#### For type "Point", each element in the coordinates array is a number representing the point coordinate in one dimension. The order of elements follows x, y, z order (or longitude, latitude, elevation for coordinates in decimal degrees).<br />
#### For type "MultiPoint", each element in the coordinates array is a coordinates array as described for type "Point".<br />
#### For type "LineString", each element in the coordinates array is a coordinates array as described for type "Point". The coordinates array for a LineString must have two or more elements. A LinearRing is a special case of type LineString where the first and last elements in the coordinates array are equivalent (they represent equivalent points). Though a LinearRing is not explicitly represented as a GeoJSON geometry type, it is referred to in the Polygon geometry type definition.<br />
#### For type "MultiLineString", each element in the coordinates array is a coordinates array as described for type "LineString".<br />
#### For type "Polygon", each element in the coordinates array is a coordinates array as described for type "LineString". Furthermore, each LineString in the coordinates array must be a LinearRing. For Polygons with multiple LinearRings, the first must be the exterior ring and any others must be interior rings or holes.<br />
#### For type "MultiPolygon", each element in the coordinates array is a coordinates array as described for type "Polygon".<br />
#### For type "Box", the coordinates array must have two elements. Each element in the coordinates array is a coordinates array as described for type "Point". The first element in the array represents the minx, miny corner of the box, and the second point represents the maxx, maxy corner of the box.<br />
## A GeoJSON object with type "GeometryCollection" represents a collection of geometry objects.<br />
### An object of type "GeometryCollection" must have a member with the name "geometries". The value corresponding to "geometries" is an array. Each element in this array is a geometry object as defined above.<br />
## A GeoJSON object with the type "Feature" represents a geometry with additional properties (referred to as a feature object below). <br />
### A feature object must have a member with the name "geometry". The value of the geometry member is a geometry object as defined above (a GeoJSON object with type "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "Box").<br />
### A feature object must have a member with the name "properties". The value of the properties member is an object (any JSON object).<br />
## A GeoJSON object with the type "FeatureCollection" represents a collection of feature objects.<br />
### An object of type "FeatureCollection" must have a member with the name "features". The value corresponding to "features" is an array. Each element in the array is a feature object as defined above.<br />
# A GeoJSON object without a member named "crs" contains geometries in a geographic coordinate reference system, using the WGS84 datum, and with units in decimal degrees. A GeoJSON object may have a member with the name "crs". If a GeoJSON object has a member named "crs", it is assumed to represent the coordinate reference system of the included geometry or geometries.<br />
## The value of a member named "crs" must be an object. This object must have at least two named members: "type" and "properties". The value of the member named "type" must be a string. The value of the member named "properties" must be an object. This specification defines no further requirements for the structure of these objects. Instead, a convention is offered.<br />
### To use EPSG codes to describe coordinate reference system, the "crs" member should have the following structure: <code>"crs": {"type": "EPSG", "properties": {"code": 2805}}</code>. "crs", "type", and "properties" must be lower case. When used as a value, "EPSG" must be upper case.<br />
#### EPSG codes must not be used if 1) the EPSG-defined axes order of the crs is not lon, lat (for a geographic crs) or easting, northing (for a projected crs), or 2) the EPSG-defined coordinate representation of a geographic crs is not decimal degrees (e.g. if is degrees/minutes/seconds). Instead, such data should use OGC URNs that specify the ordering to be lon, lat (or easting, northing) and/or the coordinate representation to be decimal degrees.<br />
### To use an OGC URN (http://portal.opengeospatial.org/files/?artifact_id=16339) as a unique identifier of a coordinate reference system, the "crs" member should have the following structure:<br />
#### The "type" member must be "OGC".<br />
#### The properties member must be an object with one member, "urn", that specifies an OGC URN such as "urn:ogc:def:crs:OGC:1.3:CRS84".<br />
#### The URN "urn:ogc:def:crs:OGC:1.3:CRS84" should be used in place of EPSG:4326 to indicate decimal degrees using the WGS84 datum in lon, lat order: the CRS object in this case would look like: <code>{"type":"OGC", "properties": {"urn":"urn:ogc:def:crs:OGC:1.3:CRS84"}}</code><br />
#### Unless your data falls under one of the exceptions above, you should prefer EPSG codes to OGC URNs.<br />
### To use a URL as a unique identifier to a coordinate reference system, the "crs" member should have the following structure: <br />
#### The properties object should contain one member: "url", that specifies a URL for the spatial reference that can be dereferenced by the client. <br />
#### An optional member, "type", is recommended, specifying the type of information available at the URL. This may be any string: suggestions are "proj4", "ogcwkt", "esriwkt", though others can be used. Applications may use this "type" member to determine the type of information that is available at the URL.<br />
#### The specification does not offer any information on how to convert this URL into a spatial reference system: use is intended to provide users the ability to define their references outside the EPSG namespace *only*.<br />
<br />
== Examples ==<br />
Each of the examples below represents a complete GeoJSON object. Note that unquoted whitespace is not significant in JSON. Whitespace is used in the examples to help illustrate the data structures - though it is not required.<br />
<br />
=== Geometries ===<br />
==== Point ====<br />
Point coordinates are in x, y order (longitude, latitude for geographic coordinates).<br />
{<br />
"type": "Point",<br />
"coordinates": [100.0, 0.0]<br />
}<br />
<br />
==== LineString ====<br />
Coordinates of LineString are an array of Point coordinates.<br />
{<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
}<br />
<br />
==== Polygon ====<br />
Coordinates of a Polygon are an array of LinearRing coordinates (LineString coordinates where the first and last points are equivalent). The first element in the array represents the exterior ring. Any subsequent elements represent interior rings (or holes).<br />
<br />
No holes<br />
{<br />
"type": "Polygon",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]<br />
]<br />
}<br />
With holes<br />
{<br />
"type": "Polygon",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],<br />
[ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]<br />
]<br />
}<br />
<br />
==== MultiPoint ====<br />
Coordinates of a MultiPoint are an array of Point coordinates.<br />
{<br />
"type": "MultiPoint",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
}<br />
<br />
==== MultiLineString ====<br />
Coordinates of a MultiLineString are an array of LineString coordinates.<br />
{<br />
"type": "MultiLineString",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 1.0] ],<br />
[ [102.0, 2.0], [103.0, 3.0] ]<br />
]<br />
}<br />
<br />
==== MultiPolygon ====<br />
Coordinates of a MultiPolygon are an array of Polygon coordinates.<br />
{<br />
"type": "MultiPolygon",<br />
"coordinates": [<br />
[<br />
[ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ]<br />
],<br />
[<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],<br />
[ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]<br />
]<br />
]<br />
}<br />
<br />
==== GeometryCollection ====<br />
Each element in the geometries array of a GeometryCollection is one of the geometry objects described above.<br />
{<br />
"type": "GeometryCollection",<br />
"geometries": [<br />
{<br />
"type": "Point",<br />
"coordinates": [100.0, 0.0]<br />
},<br />
{<br />
"type": "LineString",<br />
"coordinates": [<br />
[101.0, 0.0], [102.0, 1.0]<br />
]<br />
}<br />
]<br />
}<br />
<br />
==== Box ====<br />
Coordinates of a Box are an array of two Point coordinates. The first element in the array represents the minimum corner point (minx, miny). The second element in the array represents the maximum corner point (maxx, maxy).<br />
{<br />
"type": "Box",<br />
"coordinates": [[100.0, 0.0], [101.0, 1.0]]<br />
}<br />
<br />
=== Feature ===<br />
A Feature is an object with a geometry and additional properties.<br />
{<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
<br />
=== FeatureCollection ===<br />
Each element in the features array of a FeatureCollection is a Feature object as described above.<br />
{<br />
"type": "FeatureCollection",<br />
"features": [<br />
{<br />
"type": "Feature",<br />
"id": "id0",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
},<br />
{<br />
"type": "Feature",<br />
"id": "id1",<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": [<br />
[<br />
[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]<br />
]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
]<br />
}<br />
<br />
Same feature collection, with a member named "crs" to represent the coordinate reference system.<br />
{<br />
"type": "FeatureCollection",<br />
"crs": {<br />
"type": "URL",<br />
"properties": { <br />
"url": "http://spatialreference.org/ref/epsg/2001/proj4/",<br />
"type": "proj4"<br />
}<br />
},<br />
"features": [<br />
{<br />
"type": "Feature",<br />
"id": "id0",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
},<br />
{<br />
"type": "Feature",<br />
"id": "id1",<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": [<br />
[<br />
[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]<br />
]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
]<br />
}<br />
<br />
=== Including additional members ===<br />
GeoJSON allows additional members at any level in a GeoJSON object (as described in point 2 in the specification). <br />
<br />
For example, if you are constructing a Feature type object, three members are required (named "type", "geometry", and "properties"). In addition to these three members, you may add any additional members. The example below adds a member named "foo" with the value "bar".<br />
{<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
},<br />
"foo": "bar"<br />
}<br />
<br />
If you are working with a data standard that uses namespaces, you can handle those by taking advantage of these extra members. For example, adding a member with the name "@namespaces" is valid in GeoJSON:<br />
<br />
{<br />
"@namespaces": {"":"http://geojson.org/ns#"},<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
<br />
Additionally, since all unicode characters are allowed in member names, the following object (with a member named "atom:summary" is valid GeoJSON).<br />
<br />
{<br />
"@namespaces": {"":"http://geojson.org/ns#", "atom":"http://www.w3.org/2005/Atom"},<br />
"@type": "atom:item",<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"atom:summary": "Some GeoJSON Content",<br />
"atom:description": "This content is also valid GeoJDIL."<br />
}<br />
}<br />
<br />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Martin Daly<br />
* Christopher Schmidt<br />
* Sean Gillies</div>Mpdhttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_5&diff=124GeoJSON draft version 52007-06-04T14:28:22Z<p>Mpd: Added <code> tags around crs example in text</p>
<hr />
<div>== Overview ==<br />
<br />
GeoJSON is a data-interchange format for a variety of geographic data structures. GeoJSON can be used to represent a geometry, a feature, a collection of geometries, or a collection of features. The geometry types supported in GeoJSON are Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and Box. Features in GeoJSON are geometry objects with additional properties. A geometry collection represents a list of geometries and a feature collection represents a list of features.<br />
<br />
A complete GeoJSON data structure is always an object (in JSON terms). In GeoJSON, an ''object'' consists of a collection of name/value pairs - also called ''members''. For each ''member'', the name is always a ''string''. Member ''values'' are either a ''string'', ''number'', ''object'', ''array'' or one of the literals: '''true''', '''false''', and '''null'''. An ''array'' consists of elements where each element is a ''value'' as described above. Note that while the term ''member'' generally refers to a name/value pair, GeoJSON does use the name "members" in geometry collections and feature collections.<br />
<br />
== Definitions ==<br />
<br />
* JavaScript Object Notation (JSON), and the terms object, name, value, array, and number, are defined at http://json.org/<br />
* The terms may, should, and must are defined at http://www.ietf.org/rfc/rfc2119.txt<br />
<br />
== Specification ==<br />
<br />
# GeoJSON always consists of a single object. This object (referred to as the GeoJSON object below) represents a geometry, feature, collection of geometries, or collection of features.<br />
# The GeoJSON object may have any number of members (name/value pairs).<br />
# The GeoJSON object must have a member with the name "type". This member's value is a string that determines the type of the GeoJSON object.<br />
## The value of the type member must be one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", "Box", "GeometryCollection", "Feature", or "FeatureCollection". "type" must be lower case, the case of the type member values must be as shown here.<br />
## A geometry is a GeoJSON object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "Box". The case of the type member values must be as shown here.<br />
### In addition to the type member, a GeoJSON object that represents a geometry (referred to as a geometry object below) must have a member with the name "coordinates". The value of the coordinates member is always an array (referred to as the coordinates array below). The structure for the elements in this array are determined by the type of geometry.<br />
#### For type "Point", each element in the coordinates array is a number representing the point coordinate in one dimension. The order of elements follows x, y, z order (or longitude, latitude, elevation for coordinates in decimal degrees).<br />
#### For type "MultiPoint", each element in the coordinates array is a coordinates array as described for type "Point".<br />
#### For type "LineString", each element in the coordinates array is a coordinates array as described for type "Point". The coordinates array for a LineString must have two or more elements. A LinearRing is a special case of type LineString where the first and last elements in the coordinates array are equivalent (they represent equivalent points). Though a LinearRing is not explicitly represented as a GeoJSON geometry type, it is referred to in the Polygon geometry type definition.<br />
#### For type "Polygon", each element in the coordinates array is a coordinates array as described for type "LineString". Furthermore, each LineString in the coordinates array must be a LinearRing. For Polygons with multiple LinearRings, the first must be the exterior ring and any others must be interior rings or holes.<br />
#### For type "MultiPolygon", each element in the coordinates array is a coordinates array as described for type Polygon.<br />
#### For type "Box", the coordinates array must have two elements. Each element in the coordinates array is a coordinates array as described for type "Point". The first element in the array represents the minx, miny corner of the box, and the second point represents the maxx, maxy corner of the box.<br />
## A GeoJSON object with type "GeometryCollection" represents a collection of geometry objects.<br />
### An object of type "GeometryCollection" must have a member with the name "members". The value corresponding to "members" is an array. Each element in this array is a geometry object as defined above.<br />
## A GeoJSON object with the type "Feature" represents a geometry with additional properties (referred to as a feature object below). <br />
### A feature object must have a member with the name "geometry". The value of the geometry member is a geometry object as defined above (a GeoJSON object with type "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "Box").<br />
### A feature object must have a member with the name "properties". The value of the properties member is an object (any JSON object).<br />
## A GeoJSON object with the type "FeatureCollection" represents a collection of feature objects.<br />
### An object of type "FeatureCollection" must have a member with the name "members". The value corresponding to "members" is an array. Each element in the array is a feature object as defined above.<br />
# A GeoJSON object without a member named "crs" contains geometries in a Geographic projection, in the WGS84 datum, with units in decimal degrees. A GeoJSON object may have a member with the name "crs". If a GeoJSON object has a member named "crs", it is assumed to represent the coordinate reference system of the included geometry or geometries.<br />
## The value of a member named "crs" must be an object. This object must have at least two named members: "type" and "properties". The value of the member named "type" must be a string. The value of the member named "properties" must be an object. This specification defines no further requirements for the structure of these objects. Instead, a convention is offered.<br />
### To use EPSG codes to describe coordinate reference system, the "crs" member should have the following structure: <code>"crs": {"type": "EPSG", "properties": {"code": 4267}}</code>. "crs", "type", and "properties" must be lower case. When used as a value, "EPSG" must be upper case.<br />
### Note that the use of EPSG codes does not change the meaning of the coordinate order for a GeoJSON data structure. All coordinates in GeoJSON are in x, y order (longitude, latitude). This is true regardless of the schema used to represent the coordinate reference system.<br />
### The use of a "crs" member for EPSG:4326 is discouraged since the default of not having a "crs" member would result in the same coordinate values.<br />
<br />
== Examples ==<br />
Each of the examples below represents a complete GeoJSON object. Note that unquoted whitespace is not significant in JSON. Whitespace is used in the examples to help illustrate the data structures - though it is not required.<br />
<br />
=== Geometries ===<br />
==== Point ====<br />
Point coordinates are in x, y order (longitude, latitude for geographic coordinates).<br />
{<br />
"type": "Point",<br />
"coordinates": [100.0, 0.0]<br />
}<br />
<br />
==== LineString ====<br />
Coordinates of LineString are an array of Point coordinates.<br />
{<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
}<br />
<br />
==== Polygon ====<br />
Coordinates of a Polygon are an array of LinearRing coordinates (LineString coordinates where the first and last points are equivalent). The first element in the array represents the exterior ring. Any subsequent elements represent interior rings (or holes).<br />
<br />
No holes<br />
{<br />
"type": "Polygon",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]<br />
]<br />
}<br />
With holes<br />
{<br />
"type": "Polygon",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],<br />
[ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]<br />
]<br />
}<br />
<br />
==== MultiPoint ====<br />
Coordinates of a MultiPoint are an array of Point coordinates.<br />
{<br />
"type": "MultiPoint",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
}<br />
<br />
==== MultiLineString ====<br />
Coordinates of a MultiLineString are an array of LineString coordinates.<br />
{<br />
"type": "MultiLineString",<br />
"coordinates": [<br />
[ [100.0, 0.0], [101.0, 1.0] ],<br />
[ [102.0, 2.0], [103.0, 3.0] ]<br />
]<br />
}<br />
<br />
==== MultiPolygon ====<br />
Coordinates of a MultiPolygon are an array of Polygon coordinates.<br />
{<br />
"type": "MultiPolygon",<br />
"coordinates": [<br />
[<br />
[ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ]<br />
],<br />
[<br />
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],<br />
[ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]<br />
]<br />
]<br />
}<br />
<br />
==== Box ====<br />
Coordinates of a Box are an array of two Point coordinates. The first element in the array represents the minimum corner point (minx, miny). The second element in the array represents the maximum corner point (maxx, maxy).<br />
{<br />
"type": "Box",<br />
"coordinates": [[100.0, 0.0], [101.0, 1.0]]<br />
}<br />
<br />
=== GeometryCollection ===<br />
Each element in the members array of a GeometryCollection is one of the geometry objects described above.<br />
{<br />
"type": "GeometryCollection",<br />
"members": [<br />
{<br />
"type": "Point",<br />
"coordinates": [100.0, 0.0]<br />
},<br />
{<br />
"type": "LineString",<br />
"coordinates": [<br />
[101.0, 0.0], [102.0, 1.0]<br />
]<br />
}<br />
]<br />
}<br />
<br />
=== Feature ===<br />
A Feature is an object with a geometry and additional properties.<br />
{<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
<br />
=== FeatureCollection ===<br />
Each element in the members array of a FeatureCollection is a Feature object as described above.<br />
{<br />
"type": "FeatureCollection",<br />
"members": [<br />
{<br />
"type": "Feature",<br />
"id": "id0",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
},<br />
{<br />
"type": "Feature",<br />
"id": "id1",<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": [<br />
[<br />
[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]<br />
]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
]<br />
}<br />
<br />
Same feature collection, with a member named "crs" to represent the coordinate reference system.<br />
{<br />
"type": "FeatureCollection",<br />
"crs": {<br />
"type": "EPSG",<br />
"properties": {"code": 4267}<br />
},<br />
"members": [<br />
{<br />
"type": "Feature",<br />
"id": "id0",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
},<br />
{<br />
"type": "Feature",<br />
"id": "id1",<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": [<br />
[<br />
[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]<br />
]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
]<br />
}<br />
<br />
=== Including additional members ===<br />
GeoJSON also allows additional members at the top level of each GeoJSON object. Adding a member with the name "@namespaces" is valid in GeoJSON:<br />
<br />
{<br />
"@namespaces": {"":"http://geojson.org/ns#"},<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"prop0": "value0",<br />
"prop1": "value1"<br />
}<br />
}<br />
<br />
Additionally, since all unicode characters are allowed in member names, the following object (with a member named "atom:summary" is valid GeoJSON).<br />
<br />
{<br />
"@namespaces": {"":"http://geojson.org/ns#", "atom":"http://www.w3.org/2005/Atom"},<br />
"@type": "atom:item",<br />
"type": "Feature",<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": [<br />
[100.0, 0.0], [101.0, 1.0]<br />
]<br />
},<br />
"properties": {<br />
"atom:summary": "Some GeoJSON Content",<br />
"atom:description": "This content is also valid GeoJDIL."<br />
}<br />
}<br />
<br />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>Mpdhttp://wiki.geojson.org/index.php?title=RFC-001&diff=65RFC-0012007-05-23T11:26:08Z<p>Mpd: Updated to match proposal in this thread http://lists.geojson.org/pipermail/geojson-geojson.org/2007-April/000122.html</p>
<hr />
<div>== Definitions ==<br />
<br />
* JavaScript Object Notation (JSON), and the terms object, name, value, array, and number, are defined at http://json.org/<br />
* The terms may, should, and must are defined at http://www.ietf.org/rfc/rfc2119.txt<br />
<br />
== Specification ==<br />
<br />
# A feature is an object.<br />
# A feature may have a name/value pair whose name is 'geometry' and whose value conforms to rule 3. (A feature may have any other name/value pairs, without restriction.)<br />
# The value of a geometry must itself be an object with the following name/value pairs:<br />
#* 'type' - [Point | LineString | Polygon | Box | MultiPoint | MultiLineString | MultiPolygon | GeometryCollection]<br />
#* For 'type' [Point | LineString | Polygon | Box | MultiPoint]:<br />
#** 'coordinates' - A coordinate consists of an array of two or three number values representing x, y, and optionally z. In the case of a Point, the value of coordinates is an array consisting of a single coordinate (i.e. an array of two or three number values). In all other cases, an array of coordinates as in Point, restricted as follows:<br />
#*** A LineString must have at least two coordinates.<br />
#*** A Box must have exactly two coordinates.<br />
#*** A Polygon must have at least four coordinates, with the first and last coordinates coincident, i.e. the geometry must be closed.<br />
#*** A MultiPoint must have at least two coordinates.<br />
#* For 'type' [Polygon]:<br />
#** A Polygon may have a 'holes' name/value pair. The value of holes must itself be an array of array of coordinates, with each array of coordinates restricted as per the Polygon 'coordinates' value, i.e. it must be a closed ring with four or more coordinates. If present, the 'holes' array must contain at least one array of coordinates.<br />
#* For 'type' [MultiLineString | MultiPolygon | GeometryCollection]:<br />
#** 'members' - The value of members must be an array of geometry objects, restricted as follows:<br />
#*** A MultiLineString must contain only LineString geometry objects.<br />
#*** A MultiPolygon must contain only Polygon geometry objects.<br />
#*** A GeometryCollection must contain only Point, LineString or Polygon geometry objects.<br />
#*** In all cases, the members must not contain a 'crs' value.<br />
#* 'crs' - an optional string specifying a coordinate reference system of the coordinates. If not present, WGS84 is implied and coordinates represent decimal degrees ordered as "longitude, latitude [,elevation]" with z expressed as metres above mean sea level per WGS84. If present, the value of crs must be of the form 'EPSG:nnnnn', where 'nnnnn' is replaced by the [[#EPSG|EPSG]] crs code, e.g. 'EPSG:27700'.<br />
# A feature should have a name/value pair whose name is 'id' and whose value can be uniquely interpreted by the source of the GeoJSON string, generally identifying this GeoJSON object's resource.<br />
# A feature should have a name/value pair whose name is 'properties' and whose value is an object that has meaning within a specific community of interest.<br />
# A feature having multiple geometries should have an array of geometries contained within a properties object (see 5) which is called 'geometries' and whose values are as described in rule 3.<br />
<br />
== References ==<br />
=== GISPython: Feature Protocol ===<br />
GeoJSON is inspired in part by http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol (or maybe even a complete copy).<br />
<br />
=== EPSG ===<br />
The [http://www.ogp.org.uk International Associated of Oil & Gas Producers (OGP)] [http://www.epsg.org publishes] a widely used and widely referenced database of well-known coordinate reference systems. The database was previously published by the European Petroluem Survey Group (EPSG), before EPSG was absorbed into OGP. The EPSG/OGP database references each crs by code number, e.g. EPSG code 4326 is a geographic (latitude/longitude) crs, using the WGS84 datum.<br />
==== GeoJSON Exceptions ====<br />
* GeoJSON References to a EPSG crs are consistent with programming convention, for example in the [http://www.remotesensing.org/proj PROJ.4] library, not geodetic convention:<br />
*# When referencing a geographic crs "longitude, latitude [, elevation]" coordinate order is implied.<br />
*# When referencing a projected crs "easting, northing [, elevation]" coordinate order is implied.<br />
<br />
== Examples ==<br />
=== Collection ===<br />
A collection is an object with an array type "members" property<br />
<br />
{ "members":<br />
[ feature0, feature1, ..., featureN ]<br />
}<br />
<br />
This heads off at least one JavaScript security issue: http://bob.pythonmac.org/archives/2007/04/05/fortify-javascript-hijacking-fud/<br />
<br />
=== Features ===<br />
Adapted from Python example at [http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol GISPython: Feature Protocol]<br />
<br />
{<br />
"id": "1",<br />
"properties": {<br />
"title": "Feature 1",<br />
"summary": "The first feature",<br />
"link": "<nowiki>http://example.org/features/1</nowiki>"<br />
},<br />
"geometry": {<br />
"type": "Point",<br />
"coordinates": <nowiki>[[0.0,0.0]]</nowiki><br />
}<br />
}<br />
<br />
As in JSON, whitespace is irrelevant, so this is also valid GeoJSON:<br />
<br />
{"id":"2","properties":{"title":"Feature 2","geometry":{"type":"Point","coordinates":<nowiki>[[1.0,1.0]]</nowiki>}}<br />
<br />
=== Geometries ===<br />
<br />
Each example is presented in isolation, without the containing feature object. The 'crs' name/value pair is included for reference only, 'EPSG:4326' being equivalent to having no 'crs' name/value pair at all.<br />
<br />
==== Point ====<br />
"geometry": {<br />
"type": "Point",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0]]</nowiki><br />
}<br />
<br />
==== LineString ====<br />
"geometry": {<br />
"type": "LineString",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== Polygon ====<br />
"geometry": {<br />
"type": "Polygon",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki>,<br />
"holes": [<br />
<nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]],</nowiki><br />
<nowiki>[[0.1,0.1],[0.1,0.2],[0.2,0.2],[0.1,0.1]]</nowiki><br />
]<br />
}<br />
<br />
==== Box ====<br />
"geometry": {<br />
"type": "Box",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== MultiPoint ====<br />
"geometry": {<br />
"type": "MultiPoint",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== MultiLineString ====<br />
"geometry": {<br />
"type": "MultiLineString",<br />
"crs": "EPSG:4326",<br />
"members": [<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[2.0,2.0],[3.0,2.0],[3.0,3.0]]</nowiki><br />
}<br />
]<br />
}<br />
<br />
==== MultiPolygon ====<br />
"geometry": {<br />
"type": "MultiPolygon",<br />
"crs": "EPSG:4326",<br />
"members": [<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki>,<br />
"holes": [<br />
<nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]],</nowiki><br />
<nowiki>[[0.1,0.1],[0.1,0.2],[0.2,0.2],[0.1,0.1]]</nowiki><br />
]<br />
},<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": <nowiki>[[10.0,10.0],[11.0,0.0],[11.0,11.0],[10.0,11.0],[10.0,10.0]]</nowiki><br />
}<br />
]<br />
}<br />
<br />
==== GeometryCollection ====<br />
"geometry": {<br />
"type": "GeometryCollection",<br />
"crs": "EPSG:4326",<br />
"members": [<br />
"geometry": {<br />
"type": "Point",<br />
"coordinates": <nowiki>[[0.0,0.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "Polygon",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki>,<br />
"holes": [<br />
<nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]],</nowiki><br />
<nowiki>[[0.1,0.1],[0.1,0.2],[0.2,0.2],[0.1,0.1]]</nowiki><br />
]<br />
}<br />
]<br />
}<br />
<br />
==Authors==<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>Mpdhttp://wiki.geojson.org/index.php?title=Main_Page&diff=63Main Page2007-04-25T13:01:55Z<p>Mpd: Added IRC</p>
<hr />
<div>== GeoJSON ==<br />
<br />
* [[What_is_JSON%3F|What is JSON?]]<br />
* [[What_is_GeoJSON%3F|What is GeoJSON?]]<br />
<br />
== RFCs ==<br />
[[RFC-001]]<br />
<br />
== Other ==<br />
* [[URL_Encoded_Data|URL Encoded Data (UED)]]<br />
* [http://www.geonames.org/export/JSON-webservices.html Geonames JSON Webservices]<br />
* [http://www.google.com/apis/maps/documentation/#Geocoding_Structured Google's Geocoder JSON Response]<br />
<br />
== Discussion list ==<br />
<br />
* [http://lists.geojson.org/listinfo.cgi/geojson-geojson.org http://lists.geojson.org/listinfo.cgi/geojson-geojson.org]<br />
<br />
== IRC ==<br />
<br />
* [irc://irc.freenode.net/#gdal #geojson] channel on irc.freenode.net</div>Mpdhttp://wiki.geojson.org/index.php?title=RFC-001&diff=62RFC-0012007-04-25T06:55:54Z<p>Mpd: Fixed typo</p>
<hr />
<div>== Definitions ==<br />
<br />
* JavaScript Object Notation (JSON), and the terms object, name, value, array, and number, are defined at http://json.org/<br />
* The terms may, should, and must are defined at http://www.ietf.org/rfc/rfc2119.txt<br />
<br />
== Specification ==<br />
<br />
# A feature is an object.<br />
# A feature may have a name/value pair whose name is 'geometry' and whose value conforms to rule 3. (A feature may have any other name/value pairs, without restriction.)<br />
# The value of a geometry must itself be an object with the following name/value pairs:<br />
#* 'type' - [Point | LineString | Polygon | Box | MultiPoint | MultiLineString | MultiPolygon | GeometryCollection]<br />
#* For 'type' [Point | LineString | Box | MultiPoint]:<br />
#** 'coordinates' - A coordinate consists of an array of two or three number values representing x, y, and optionally z. In the case of a Point, the value of coordinates is an array consisting of a single coordinate (i.e. an array of two or three number values). In all other cases, an array of coordinates as in Point, restricted as follows:<br />
#*** A LineString must have at least two coordinates.<br />
#*** A Box must have exactly two coordinates.<br />
#*** A MultiPoint must have at least two coordinates.<br />
#* For 'type' [Polygon]:<br />
#** 'exterior' - The value of an exterior must itself be a geometry object with the following name/value pairs:<br />
#*** 'type' - LinearRing<br />
#*** 'coordinates' - An array of coordinates as defined above, restricted as follows:<br />
#**** A LinearRing must have at least four coordinates, with the first and last coordinates coincident, i.e. the geometry must be closed.<br />
#** A Polygon may have a 'holes' name/value pair. The value of holes must itself be an array of geometries of type LinearRing, as defined for exterior. If present, the array must contain at least one LinearRing.<br />
#* For 'type' [MultiLineString | MultiPolygon | GeometryCollection]:<br />
#** 'members' - The value of members must be an array of geometry objects, restricted as follows:<br />
#*** A MultiLineString must contain only LineString geometry objects.<br />
#*** A MultiPolygon must contain only Polygon geometry objects.<br />
#*** A GeometryCollection must contain only Point, LineString or Polygon geometry objects.<br />
#*** In all cases, the members must not contain a 'crs' value.<br />
#* 'crs' - an optional string specifying a coordinate reference system of the coordinates. If not present, WGS84 is implied and coordinates represent decimal degrees ordered as "longitude, latitude [,elevation]" with z expressed as metres above mean sea level per WGS84. If present, the value of crs must be of the form 'EPSG:nnnn', where 'nnnn' represents the [[#EPSG|EPSG]] crs code.<br />
# A feature should have a name/value pair whose name is 'id' and whose value can be uniquely interpreted by the source of the GeoJSON string, generally identifying this GeoJSON object's resource.<br />
# A feature should have a name/value pair whose name is 'properties' and whose value is an object that has meaning within a specific community of interest.<br />
# A feature having multiple geometries should have an array of geometries contained within a properties object (see 5) which is called 'geometries' and whose values are as described in rule 3.<br />
<br />
== References ==<br />
=== GISPython: Feature Protocol ===<br />
GeoJSON is inspired in part by http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol (or maybe even a complete copy).<br />
<br />
=== EPSG ===<br />
The [http://www.ogp.org.uk International Associated of Oil & Gas Producers (OGP)] [http://www.epsg.org publishes] a widely used and widely referenced database of well-known coordinate reference systems. The database was previously published by the European Petroluem Survey Group (EPSG), before EPSG was absorbed into OGP. The EPSG/OGP database references each crs by code number, e.g. EPSG code 4326 is a geographic (latitude/longitude) crs, using the WGS84 datum.<br />
==== GeoJSON Exceptions ====<br />
* GeoJSON References to a EPSG crs are consistent with programming convention, for example in the [http://www.remotesensing.org/proj PROJ.4] library, not geodetic convention:<br />
*# When referencing a geographic crs "longitude, latitude [, elevation]" coordinate order is implied.<br />
*# When referencing a projected crs "easting, northing [, elevation]" coordinate order is implied.<br />
<br />
== Examples ==<br />
=== Collection ===<br />
A collection is an object with an array type "members" property<br />
<br />
{ "members":<br />
[ feature0, feature1, ..., featureN ]<br />
}<br />
<br />
This heads off at least one JavaScript security issue: http://bob.pythonmac.org/archives/2007/04/05/fortify-javascript-hijacking-fud/<br />
<br />
=== Features ===<br />
Adapted from Python example at [http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol GISPython: Feature Protocol]<br />
<br />
{<br />
"id": "1",<br />
"properties": {<br />
"title": "Feature 1",<br />
"summary": "The first feature",<br />
"link": "<nowiki>http://example.org/features/1</nowiki>"<br />
},<br />
"geometry": {<br />
"type": "Point",<br />
"coordinates": <nowiki>[[0.0,0.0]]</nowiki><br />
}<br />
}<br />
<br />
As in JSON, whitespace is irrelevant::<br />
<br />
{"id":"2","properties":{"title":"Feature 2","geometry":{"type":"Point","coordinates":<nowiki>[[1.0,1.0]]</nowiki>}}<br />
<br />
=== Geometries ===<br />
<br />
Each example is presented in isolation, without the containing feature object. The 'crs' name/value pair is included for reference only, 'EPSG:4326' being equivalent to having no 'crs' name/value pair at all.<br />
<br />
==== Point ====<br />
"geometry": {<br />
"type": "Point",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0]]</nowiki><br />
}<br />
<br />
==== LineString ====<br />
"geometry": {<br />
"type": "LineString",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== Polygon ====<br />
"geometry": {<br />
"type": "Polygon",<br />
"crs": "EPSG:4326",<br />
"exterior": {<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki><br />
}<br />
"holes":[<br />
{<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]]</nowiki><br />
}<br />
]<br />
}<br />
<br />
==== Box ====<br />
"geometry": {<br />
"type": "Box",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== MultiPoint ====<br />
"geometry": {<br />
"type": "MultiPoint",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== MultiLineString ====<br />
"geometry": {<br />
"type": "MultiLineString",<br />
"crs": "EPSG:4326",<br />
"members": [<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[2.0,2.0],[3.0,2.0],[3.0,3.0]]</nowiki><br />
}<br />
]<br />
}<br />
<br />
==== MultiPolygon ====<br />
"geometry": {<br />
"type": "MultiPolygon",<br />
"crs": "EPSG:4326",<br />
"members": [<br />
"geometry": {<br />
"type": "Polygon",<br />
"exterior": {<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki><br />
}<br />
"holes":[<br />
{<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]]</nowiki><br />
}<br />
]<br />
},<br />
"geometry": {<br />
"type": "Polygon",<br />
"exterior": {<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[10.0,10.0],[11.0,0.0],[11.0,11.0],[10.0,11.0],[10.0,10.0]]</nowiki><br />
}<br />
}<br />
]<br />
}<br />
<br />
==== GeometryCollection ====<br />
"geometry": {<br />
"type": "GeometryCollection",<br />
"crs": "EPSG:4326",<br />
"members": [<br />
"geometry": {<br />
"type": "Point",<br />
"coordinates": <nowiki>[[0.0,0.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "Polygon",<br />
"exterior": {<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki><br />
}<br />
"holes":[<br />
{<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]]</nowiki><br />
}<br />
]<br />
}<br />
]<br />
}<br />
<br />
==Authors==<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>Mpdhttp://wiki.geojson.org/index.php?title=RFC-001&diff=59RFC-0012007-04-24T11:18:57Z<p>Mpd: Fixed Multi examples, strengthened EPSG/PROJ.4 reference, and shuffled some text</p>
<hr />
<div>== Definitions ==<br />
<br />
* JavaScript Object Notation (JSON), and the terms object, name, value, array, and number, are defined at http://json.org/<br />
* The terms may, should, and must are defined at http://www.ietf.org/rfc/rfc2119.txt<br />
<br />
== Specification ==<br />
<br />
# A feature is an object.<br />
# A feature may have a name/value pair whose name is 'geometry' and whose value conforms to rule 3. (A feature may have any other name/value pairs, without restriction.)<br />
# The value of a geometry must itself be an object with the following name/value pairs:<br />
#* 'type' - [Point | LineString | Polygon | Box | MultiPoint | MultiLineString | MultiPolygon | GeometryCollection]<br />
#* For 'type' [Point | LineString | Box | MultiPoint]:<br />
#** 'coordinates' - A coordinate consists of an array of two or three number values representing x, y, and optionally z. In the case of a Point, the value of coordinates is an array consisting of a single coordinate (i.e. an array of two or three number values). In all other cases, an array of coordinates as in Point, restricted as follows:<br />
#*** A LineString must have at least two coordinates.<br />
#*** A Box must have exactly two coordinates.<br />
#*** A MultiPoint must have at least two coordinates.<br />
#* For 'type' [Polygon]:<br />
#** 'exterior' - The value of an exterior must itself be a geometry object with the following name/value pairs:<br />
#*** 'type' - LinearRing<br />
#*** 'coordinates' - An array of coordinates as defined above, restricted as follows:<br />
#**** A LinearRing must have at least four coordinates, with the first and last coordinates coincident, i.e. the geometry must be closed.<br />
#** A Polygon may have a 'holes' name/value pair. The value of holes must itself be an array of geometries of type LinearRing, as defined for exterior. If present, the array must contain at least one LinearRing.<br />
#* For 'type' [MultiLineString | MultiPolygon | GeometryCollection]:<br />
#** 'members' - The value of members must be an array of geometry objects, restricted as follows:<br />
#*** A MultiLineString must contain only LineString geometry objects.<br />
#*** A MultiPolygon must contain only Polygon geometry objects.<br />
#*** A GeometryCollection must contain only Point, LineString or Polygon geometry objects.<br />
#*** In all cases, the members must not contain a 'crs' value.<br />
#* 'crs' - an optional string specifying a coordinate reference system of the coordinates. If not present, WGS84 is implied and coordinates represent decimal degrees ordered as "longitude, latitude [,elevation]" with z expressed as metres above mean sea level per WGS84. If present, the value of crs must be of the form 'EPSG:nnnn', where 'nnnn' represents the [[#EPSG|EPSG]] crs code.<br />
# A feature should have a name/value pair whose name is 'id' and whose value can be uniquely interpreted by the source of the GeoJSON string, generally identifying this GeoJSON object's resource.<br />
# A feature should have a name/value pair whose name is 'properties' and whose value is an object that has meaning within a specific community of interest.<br />
# A feature having multiple geometries should have an array of geometries contained within a properties object (see 5) which is called 'geometries' and whose values are as described in rule 3.<br />
<br />
== References ==<br />
=== GISPython: Feature Protocol ===<br />
GeoJSON is inspired in part by http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol (or maybe even a complete copy).<br />
<br />
=== EPSG ===<br />
The [http://www.ogp.org.uk International Associated of Oil & Gas Producers (OGP)] [http://www.epsg.org publishes] a widely used and widely referenced database of well-known coordinate reference systems. The database was previously published by the European Petroluem Survey Group (EPSG), before EPSG was absorbed into OGP. The EPSG/OGP database references each crs by code number, e.g. EPSG code 4326 is a geographic (latitude/longitude) crs, using the WGS84 datum.<br />
==== GeoJSON Exceptions ====<br />
* GeoJSON References to a EPSG crs are consistent with programming convention, for example in the [http://www.remotesensing.org/proj PROJ.4] library, not geodetic convention:<br />
*# When referencing a geographic crs "longitude, latitude [, elevetion]" coordinate order is implied.<br />
*# When referencing a projected crs "easting, northing [, elevation]" coordinate order is implied.<br />
<br />
== Examples ==<br />
=== Features ===<br />
Adapted from Python example at [http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol GISPython: Feature Protocol]<br />
<br />
{<br />
"id": "1",<br />
"properties": {<br />
"title": "Feature 1",<br />
"summary": "The first feature",<br />
"link": "<nowiki>http://example.org/features/1</nowiki>"<br />
},<br />
"geometry": {<br />
"type": "Point",<br />
"coordinates": <nowiki>[[0.0,0.0]]</nowiki><br />
}<br />
}<br />
<br />
As in JSON, whitespace is irrelevant::<br />
<br />
{"id":"2","properties":{"title":"Feature 2","geometry":{"type":"Point","coordinates":<nowiki>[[1.0,1.0]]</nowiki>}}<br />
<br />
=== Geometries ===<br />
<br />
Each example is presented in isolation, without the containing feature object. The 'crs' name/value pair is included for reference only, 'EPSG:4326' being equivalent to having no 'crs' name/value pair at all.<br />
<br />
==== Point ====<br />
"geometry": {<br />
"type": "Point",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0]]</nowiki><br />
}<br />
<br />
==== LineString ====<br />
"geometry": {<br />
"type": "LineString",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== Polygon ====<br />
"geometry": {<br />
"type": "Polygon",<br />
"crs": "EPSG:4326",<br />
"exterior": {<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki><br />
}<br />
"holes":[<br />
{<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]]</nowiki><br />
}<br />
]<br />
}<br />
<br />
==== Box ====<br />
"geometry": {<br />
"type": "Box",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== MultiPoint ====<br />
"geometry": {<br />
"type": "MultiPoint",<br />
"crs": "EPSG:4326",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== MultiLineString ====<br />
"geometry": {<br />
"type": "MultiLineString",<br />
"crs": "EPSG:4326",<br />
"members": [<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[2.0,2.0],[3.0,2.0],[3.0,3.0]]</nowiki><br />
}<br />
]<br />
}<br />
<br />
==== MultiPolygon ====<br />
"geometry": {<br />
"type": "MultiPolygon",<br />
"crs": "EPSG:4326",<br />
"members": [<br />
"geometry": {<br />
"type": "Polygon",<br />
"exterior": {<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki><br />
}<br />
"holes":[<br />
{<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]]</nowiki><br />
}<br />
]<br />
},<br />
"geometry": {<br />
"type": "Polygon",<br />
"exterior": {<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[10.0,10.0],[11.0,0.0],[11.0,11.0],[10.0,11.0],[10.0,10.0]]</nowiki><br />
}<br />
}<br />
]<br />
}<br />
<br />
==== GeometryCollection ====<br />
"geometry": {<br />
"type": "GeometryCollection",<br />
"crs": "EPSG:4326",<br />
"members": [<br />
"geometry": {<br />
"type": "Point",<br />
"coordinates": <nowiki>[[0.0,0.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "Polygon",<br />
"exterior": {<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki><br />
}<br />
"holes":[<br />
{<br />
"type": "LinearRing",<br />
"coordinates": <nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]]</nowiki><br />
}<br />
]<br />
}<br />
]<br />
}<br />
<br />
==Authors==<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>Mpdhttp://wiki.geojson.org/index.php?title=RFC-001&diff=58RFC-0012007-04-13T16:15:50Z<p>Mpd: Added multi-s, polygon exterior and holes, and examples of all geometry types</p>
<hr />
<div>Inspired in part by http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol (or maybe even a complete copy )<br />
<br />
== Definitions ==<br />
* The terms object, name, value, array, and number are defined at http://json.org/<br />
* The terms may, should, and must are defined at http://www.ietf.org/rfc/rfc2119.txt<br />
<br />
== Specification ==<br />
<br />
# A feature is an object.<br />
# A feature may have a name/value pair whose name is 'geometry' and whose value conforms to rule 3. (A feature may have any other name/value pairs, without restriction.)<br />
# The value of a geometry must itself be an object with the following name/value pairs:<br />
#* 'type' - [Point | LineString | Polygon | Box | MultiPoint | MultiLineString | MultiPolygon | GeometryCollection]<br />
#* For 'type' [Point | LineString | Box | MultiPoint]:<br />
#** 'coordinates' - A coordinate consists of an array of two or three number values representing x, y, and optionally z. In the case of a Point, the value of coordinates is an array consisting of a single coordinate (i.e. an array of two or three number values). In all other cases, an array of coordinates as in Point, restricted as follows:<br />
#*** A LineString must have at least two coordinates.<br />
#*** A Box must have exactly two coordinates.<br />
#*** A MultiPoint must have at least two coordinates.<br />
#* For 'type' [Polygon]:<br />
#** 'exterior' - The value of an exterior must itself be a geometry object with the following name/value pairs:<br />
#*** 'type' - LinearRing<br />
#*** 'coordinates' - An array of coordinates as defined above, restricted as follows:<br />
#**** A LinearRing must have at least four coordinates, with the first and last coordinates coincident, i.e. the geometry is closed.<br />
#** A Polygon may have a 'holes' name/value pair. The value of holes must itself be an array of geometries of type LinearRing, as defined for exterior. If present, the array must contain at least one LinearRing.<br />
#* For 'type' [MultiLineString | MultiPolygon | GeometryCollection]:<br />
#** 'members' - The value of members must be an array of geometry objects, restricted as follows:<br />
#*** A MultiLineString must contain only LineString geometry objects.<br />
#*** A MultiPolygon must contain only Polygon geometry objects.<br />
#*** A GeometryCollection must contain only Point, LineString or Polygon geometry objects.<br />
#*** In all cases, the members must not contain a 'crs' value.<br />
#* 'crs' - an optional string specifying a coordinate reference system of the coordinates. If not present, WGS84 is implied and coordinates represent decimal degrees ordered as "longitude, latitude [,elevation]" and z is expressed as meters above mean sea level per WGS84. If present, the value of crs is to be interpreted as in PROJ4's EPSG tables and the values of the coordinates are to be interpreted accordingly.<br />
# A feature should have a name/value pair whose name is 'id' and whose value can be uniquely interpreted by the source of the GeoJSON string, generally identifying this GeoJSON object's resource.<br />
# A feature should have a name/value pair whose name is 'properties' and whose value is an object that has meaning within a specific community of interest.<br />
# A feature having multiple geometries should have an array of geometries contained within a properties object (see 5) which is called 'geometries' and whose values are as described in 3.<br />
<br />
== Examples ==<br />
=== Features ===<br />
adapted from Python example at [http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol GISPython: Feature Protocol]<br />
{ <br />
"id": "1",<br />
"properties": {<br />
"title": "Feature 1",<br />
"summary": "The first feature",<br />
"link": "http:example.org/features/1"<br />
},<br />
"geometry": {<br />
"type": "Point",<br />
"coordinates": <nowiki>[[-105.8, 40.05]]</nowiki><br />
}<br />
}<br />
<br />
=== Geometries ===<br />
<br />
Each example is presented in isolation, without the containing feature object.<br />
<br />
==== Point ====<br />
"geometry": {<br />
"type": "Point",<br />
"coordinates": <nowiki>[[0.0,0.0]]</nowiki><br />
}<br />
<br />
==== LineString ====<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== Polygon ====<br />
"geometry": {<br />
"type": "Polygon",<br />
"exterior":{<br />
"type":"LinearRing",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki><br />
}<br />
"holes":[<br />
{<br />
"type":"LinearRing",<br />
"coordinates": <nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]]</nowiki><br />
}<br />
]<br />
}<br />
<br />
==== Box ====<br />
"geometry": {<br />
"type": "Box",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== MultiPoint ====<br />
"geometry": {<br />
"type": "MultiPoint",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,1.0]]</nowiki><br />
}<br />
<br />
==== MultiLineString ====<br />
"members": [<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[2.0,2.0],[3.0,2.0],[3.0,3.0]]</nowiki><br />
}<br />
]<br />
<br />
==== MultiPolygon ====<br />
"members": [<br />
"geometry": {<br />
"type": "Polygon",<br />
"exterior":{<br />
"type":"LinearRing",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki><br />
}<br />
"holes":[<br />
{<br />
"type":"LinearRing",<br />
"coordinates": <nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]]</nowiki><br />
}<br />
]<br />
},<br />
"geometry": {<br />
"type": "Polygon",<br />
"exterior":{<br />
"type":"LinearRing",<br />
"coordinates": <nowiki>[[10.0,10.0],[11.0,0.0],[11.0,11.0],[10.0,11.0],[10.0,10.0]]</nowiki><br />
}<br />
}<br />
]<br />
<br />
==== GeometryCollection ====<br />
"members": [<br />
"geometry": {<br />
"type": "Point",<br />
"coordinates": <nowiki>[[0.0,0.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "LineString",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0]]</nowiki><br />
},<br />
"geometry": {<br />
"type": "Polygon",<br />
"exterior":{<br />
"type":"LinearRing",<br />
"coordinates": <nowiki>[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]]</nowiki><br />
}<br />
"holes":[<br />
{<br />
"type":"LinearRing",<br />
"coordinates": <nowiki>[[0.25,0.25],[0.75,0.25],[0.75,0.75],[0.25,0.75],[0.25,0.25]]</nowiki><br />
}<br />
]<br />
},<br />
]<br />
<br />
==Authors==<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>Mpdhttp://wiki.geojson.org/index.php?title=Talk:RFC-001&diff=53Talk:RFC-0012007-04-12T12:40:18Z<p>Mpd: </p>
<hr />
<div>== [[User:Mpd|Mpd]] Comments and Questions ==<br />
# I'd prefer "crs" to "srs", the latter being out step with, for example, EPSG and OGC terminology. Ditto for "LineString" and "Line", and perhaps (although less so) "Envelope" and "Box"<br />
# Why reference PROJ.4's EPSG tables and not the EPSG tables themselves? Do I sense a coordinate order holy war type thing going on?<br />
# What about <nowiki>Multi[Point|LineString|Polygon]</nowiki> and GeometryCollection?<br />
# What about Polygons with multiple rings? [http://lists.geojson.org/pipermail/geojson-geojson.org/2007-March/000030.html An earlier proposal] handled this.<br />
# How does a client determine whether the, for example, six ordinates in a Line/LineString are two x,y,z-s or three x,y-s?<br />
# [http://lists.geojson.org/pipermail/geojson-geojson.org/2007-March/000016.html You suggested] an "Authors" section, for CC reasons. Care to add one?<br />
[[User:Mpd|Mpd]]<br />
<br />
== [[User:AllanDoyle|AllanDoyle]] Response ==<br />
# Shoot. I thought SRS was in vogue and CRS is out. Great. Let's go with crs. I have no preference with linestring, etc.<br />
# PROJ vs EPSG. PROJ is what coders will see. They may never look at EPSG. Few people will use anything other than PROJ.<br />
# Multi Schmulti, I always say. :)<br />
# Rings Schmings... toss 'em in.<br />
# This is JSON, not GML, so we should (a) use commas and (b) use proper arrays and arrays of arrays.<br />
# Drat. OK. Authors coming right up.<br />
<br />
== [[User:Mpd|Mpd]] Response to response ==<br />
# Good.<br />
# I don't understand: do you mean use PROJ.4 definition strings? How about [http://portal.opengeospatial.org/files/?artifact_id=16339 OGC URN-s (with click-through licence)]? Examples are: "urn:ogc:def:crs:OGC:1.3:CRS84" for the CRS formerly known as "EPSG:4326 with lat/lon axes order"; and "urn:ogc:def:crs:EPSG:6.3:26986" for "EPSG:26986".<br />
# [http://en.wikipedia.org/wiki/Image:EU_location_UK.png MultiPolygons] and [http://en.wikipedia.org/wiki/Image:Amazon_river_basin.png MultiLines] really do exist.<br />
# Anyone for [http://www.tradgames.org.uk/games/Quoits.htm Quoits]?<br />
# OK by me<br />
# Thanks.<br />
[[User:Mpd|Mpd]]</div>Mpdhttp://wiki.geojson.org/index.php?title=Talk:RFC-001&diff=44Talk:RFC-0012007-04-11T12:42:16Z<p>Mpd: New page: == ~~~ Comments and Questions == # I'd prefer "crs" to "srs", the latter being out step with, for example, EPSG and OGC terminology. Ditto for "LineString" and "Line", and perhaps (althoug...</p>
<hr />
<div>== [[User:Mpd|Mpd]] Comments and Questions ==<br />
# I'd prefer "crs" to "srs", the latter being out step with, for example, EPSG and OGC terminology. Ditto for "LineString" and "Line", and perhaps (although less so) "Envelope" and "Box"<br />
# Why reference PROJ.4's EPSG tables and not the EPSG tables themselves? Do I sense a coordinate order holy war type thing going on?<br />
# What about <nowiki>Multi[Point|LineString|Polygon]</nowiki> and GeometryCollection?<br />
# What about Polygons with multiple rings? [http://lists.geojson.org/pipermail/geojson-geojson.org/2007-March/000030.html An earlier proposal] handled this.<br />
# How does a client determine whether the, for example, six ordinates in a Line/LineString are two x,y,z-s or three x,y-s?<br />
# [http://lists.geojson.org/pipermail/geojson-geojson.org/2007-March/000016.html You suggested] an "Authors" section, for CC reasons. Care to add one?<br />
[[User:Mpd|Mpd]]</div>Mpdhttp://wiki.geojson.org/index.php?title=File:Test.doc&diff=32File:Test.doc2007-03-23T10:28:03Z<p>Mpd: </p>
<hr />
<div></div>Mpdhttp://wiki.geojson.org/index.php?title=File:Cadcorp_SIS_GeoJSON_Plugin.png&diff=27File:Cadcorp SIS GeoJSON Plugin.png2007-03-22T22:20:36Z<p>Mpd: Screenshot of Cadcorp SIS showing features parsed from GeoServer JSON output</p>
<hr />
<div>Screenshot of Cadcorp SIS showing features parsed from GeoServer JSON output</div>Mpdhttp://wiki.geojson.org/index.php?title=Main_Page&diff=26Main Page2007-03-19T16:51:50Z<p>Mpd: Added Geonames</p>
<hr />
<div>== GeoJSON ==<br />
<br />
* [[What_is_JSON%3F|What is JSON?]]<br />
* [[What_is_GeoJSON%3F|What is GeoJSON?]]<br />
<br />
== Other ==<br />
* [[URL_Encoded_Data|URL Encoded Data (UED)]]<br />
* [http://www.geonames.org/export/JSON-webservices.html Geonames JSON Webservices]<br />
<br />
== Discussion list ==<br />
<br />
* [http://lists.geojson.org/listinfo.cgi/geojson-geojson.org http://lists.geojson.org/listinfo.cgi/geojson-geojson.org]</div>Mpdhttp://wiki.geojson.org/index.php?title=GeoJSON_Features&diff=16GeoJSON Features2007-03-15T16:45:03Z<p>Mpd: polygon array needed more []-s</p>
<hr />
<div>Based on an initial outline at [http://icon.stoa.org/trac/pleiades/wiki/GeoJSON http://icon.stoa.org/trac/pleiades/wiki/GeoJSON]<br />
<br />
{ "features": [<br />
{ "id": "alesia",<br />
"title": "Alesia",<br />
"classname": "settlement",<br />
"geometryType": "point",<br />
"spatialCoordinates": <nowiki>[[47.535, 4.478, 0.0]]</nowiki>,<br />
"srs": "EPSG:4326",<br />
"center": [47.535, 4.478, 0.0]<br />
}<br />
]<br />
}<br />
<br />
== Possible Changes ==<br />
<br />
* Should <code>geometryType</code> and <code>spatialCoordinates</code> be rolled together? For example:<br />
<br />
{ "features": [<br />
{ "id": "point_example",<br />
"title": "Point Example",<br />
"point": <nowiki>[[0.0, 0.0, 0.0]]</nowiki>,<br />
"srs": "EPSG:4326"<br />
}<br />
{ "id": "linestring_example",<br />
"title": "LineString Example",<br />
"linestring": [[0.0, 0.0, 0.0] [1.0, 1.0, 0.0]],<br />
"srs": "EPSG:4326"<br />
}<br />
{ "id": "polygon_example",<br />
"title": "Polygon Example",<br />
"polygon": [[[0.0, 0.0, 0.0] [1.0, 0.0, 0.0] [1.0, 1.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 0.0]]],<br />
"srs": "EPSG:4326"<br />
}<br />
]<br />
}<br />
<br />
* Should the GML (RDF-like) Object-Property model be used instead?<br />
* Should the <code>srs</code> be at the <code>features</code> level, instead of repeated for each feature? This would also force homogeneous <code>srs</code>-s.<br />
* Should heirarchical (non-spatial) properties be allowed, or only flat "shapefile-like" structure?</div>Mpdhttp://wiki.geojson.org/index.php?title=GeoJSON_Features&diff=13GeoJSON Features2007-03-13T09:27:49Z<p>Mpd: New page: Based on an initial outline at [http://icon.stoa.org/trac/pleiades/wiki/GeoJSON http://icon.stoa.org/trac/pleiades/wiki/GeoJSON] { "features": [ { "id": "alesia", "title": "A...</p>
<hr />
<div>Based on an initial outline at [http://icon.stoa.org/trac/pleiades/wiki/GeoJSON http://icon.stoa.org/trac/pleiades/wiki/GeoJSON]<br />
<br />
{ "features": [<br />
{ "id": "alesia",<br />
"title": "Alesia",<br />
"classname": "settlement",<br />
"geometryType": "point",<br />
"spatialCoordinates": <nowiki>[[47.535, 4.478, 0.0]]</nowiki>,<br />
"srs": "EPSG:4326",<br />
"center": [47.535, 4.478, 0.0]<br />
}<br />
]<br />
}<br />
<br />
== Possible Changes ==<br />
<br />
* Should <code>geometryType</code> and <code>spatialCoordinates</code> be rolled together? For example:<br />
<br />
{ "features": [<br />
{ "id": "point_example",<br />
"title": "Point Example",<br />
"point": <nowiki>[[0.0, 0.0, 0.0]]</nowiki>,<br />
"srs": "EPSG:4326"<br />
}<br />
{ "id": "linestring_example",<br />
"title": "LineString Example",<br />
"linestring": [[0.0, 0.0, 0.0] [1.0, 1.0, 0.0]],<br />
"srs": "EPSG:4326"<br />
}<br />
{ "id": "polygon_example",<br />
"title": "Polygon Example",<br />
"polygon": [[0.0, 0.0, 0.0] [1.0, 0.0, 0.0] [1.0, 1.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 0.0]],<br />
"srs": "EPSG:4326"<br />
}<br />
]<br />
}<br />
<br />
* Should the GML (RDF-like) Object-Property model be used instead?<br />
* Should the <code>srs</code> be at the <code>features</code> level, instead of repeated for each feature? This would also force homogeneous <code>srs</code>-s.<br />
* Should heirarchical (non-spatial) properties be allowed, or only flat "shapefile-like" structure?</div>Mpdhttp://wiki.geojson.org/index.php?title=GeoJSON_Context&diff=12GeoJSON Context2007-03-13T09:11:59Z<p>Mpd: </p>
<hr />
<div>Based on an initial outline at [http://icon.stoa.org/trac/pleiades/wiki/GeoJSON http://icon.stoa.org/trac/pleiades/wiki/GeoJSON]<br />
<br />
{ "name": "map-1",<br />
"title": "Pleiades Map 1",<br />
"boundingBox": [-12.0, 32.0, 40.0, 58.0],<br />
"srs": "EPSG:4326",<br />
"layers": [<br />
{ "name": "dphysio",<br />
"title: "Demis Physiography"<br />
"layers": "Bathymetry,Topography,Rivers,Waterbodies",<br />
"styles": ",,,",<br />
"onlineResource": "http:\/\/www2.demis.nl\/mapserver\/request.asp",<br />
"srs": "EPSG:4326"<br />
}<br />
]<br />
}<br />
<br />
== Possible Changes ==<br />
<br />
* Make <code>onlineResource</code> an array, containing GetCapabilities, GetMap and, if relevant, GetFeatureInfo URLs '''even if they are the same'''. This will avoid the confusion that exists with OGC Web Map Context.<br />
* Add <code>"version": "major.minor.revision"</code></div>Mpdhttp://wiki.geojson.org/index.php?title=GeoJSON_Context&diff=11GeoJSON Context2007-03-13T09:09:39Z<p>Mpd: New page: Based on an initial outline at [http://icon.stoa.org/trac/pleiades/wiki/GeoJSON http://icon.stoa.org/trac/pleiades/wiki/GeoJSON] { "name": "map-1", "title": "Pleiades Map 1", "boun...</p>
<hr />
<div>Based on an initial outline at [http://icon.stoa.org/trac/pleiades/wiki/GeoJSON http://icon.stoa.org/trac/pleiades/wiki/GeoJSON]<br />
<br />
{ "name": "map-1",<br />
"title": "Pleiades Map 1",<br />
"boundingBox": [-12.0, 32.0, 40.0, 58.0],<br />
"srs": "EPSG:4326",<br />
"layers": [<br />
{ "name": "dphysio",<br />
"title: "Demis Physiography"<br />
"layers": "Bathymetry,Topography,Rivers,Waterbodies",<br />
"styles": ",,,",<br />
"onlineResource": "http:\/\/www2.demis.nl\/mapserver\/request.asp",<br />
"srs": "EPSG:4326"<br />
}<br />
]<br />
}<br />
<br />
== Suggested Changes ==<br />
<br />
* Make <code>onlineResource</code> an array, containing GetCapabilities, GetMap and, if relevant, GetFeatureInfo URLs '''even if they are the same'''. This will avoid the confusion that exists with OGC Web Map Context.<br />
* Add <code>"version": "major.minor.revision"</code></div>Mpdhttp://wiki.geojson.org/index.php?title=What_is_GeoJSON%3F&diff=10What is GeoJSON?2007-03-13T09:02:35Z<p>Mpd: </p>
<hr />
<div>GeoJSON is a collaborative project to to determine what, if any, geographic content can be encoded in JSON.<br />
<br />
== GeoJSON Encodings ==<br />
<br />
* [[GeoJSON_Context|GeoJSON Web Map Context]], derived from [http://www.opengeospatial.org OGC] [http://www.opengeospatial.org/standards/wmc Web Map Context]<br />
* [[GeoJSON_Features|GeoJSON Features]], derived from OGC [http://www.opengeospatial.org/standards/gml Geography Markup Language (GML)]<br />
<br />
== Other GeoJSON Encoding Candidates ==<br />
<br />
* OGC [http://www.opengeospatial.org/standards/wfs Web Feature Service (WFS)], with an emphasis on [http://www.ogcnetwork.net/wfssimple WFS Simple]<br />
<br />
== Useful links ==<br />
<br />
* [http://icon.stoa.org/trac/pleiades/wiki/GeoJSON GeoJSON] - one of the first attempts to encode geographic data in JSON (with the name kindly donated to this effort)<br />
* [http://jdil.org/ JIDL] - "describes a simple scheme for implementing namespaced vocabularies in JSON"<br />
* [http://lists.burri.to/pipermail/geowanking/2007-February/thread.html Geowanking mailing list thread "JSON for GEO"]</div>Mpdhttp://wiki.geojson.org/index.php?title=Main_Page&diff=9Main Page2007-03-13T08:57:53Z<p>Mpd: </p>
<hr />
<div>== GeoJSON ==<br />
<br />
* [[What_is_JSON%3F|What is JSON?]]<br />
* [[What_is_GeoJSON%3F|What is GeoJSON?]]<br />
<br />
== Discussion list ==<br />
<br />
* [http://lists.geojson.org/listinfo.cgi/geojson-geojson.org http://lists.geojson.org/listinfo.cgi/geojson-geojson.org]</div>Mpdhttp://wiki.geojson.org/index.php?title=What_is_JSON%3F&diff=8What is JSON?2007-03-12T10:46:39Z<p>Mpd: </p>
<hr />
<div>"JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. ... JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language." – http://json.org<br />
<br />
In JSON, an object is an unordered set of name/value pairs with a restricted set of values: string, number, object, array, true, false, null. An object contains an array of values. Because one of the supported value types is object, JSON supports nested object definitions.<br />
<br />
In JavaScript, JSON can be converted to and from a JavaScript variable with a single procedure call.<br />
<br />
== JSON and XML ==<br />
<br />
"Unfortunately, XML is not well suited to data-interchange, much as a wrench is not well-suited to driving nails. It carries a lot of baggage, and it doesn't match the data model of most programming languages. When most programmers saw XML for the first time, they were shocked at how ugly and inefficient it was. It turns out that that first reaction was the correct one. There is another text notation that has all of the advantages of XML, but is much better suited to data-interchange. That notation is JavaScript Object Notation (JSON)." – http://json.org/xml.html<br />
<br />
== Useful links ==<br />
<br />
* [http://json.org Introducing JSON]<br />
* [http://en.wikipedia.org/wiki/Json The inevitable Wikipedia link]</div>Mpdhttp://wiki.geojson.org/index.php?title=What_is_GeoJSON%3F&diff=7What is GeoJSON?2007-03-12T10:39:51Z<p>Mpd: New page: GeoJSON is a collaborative project to to determine what, if any, geographic content can be encoded in JSON. == Candidates for encoding == * [http://www.opengeospatial.org OGC] [http://ww...</p>
<hr />
<div>GeoJSON is a collaborative project to to determine what, if any, geographic content can be encoded in JSON.<br />
<br />
== Candidates for encoding ==<br />
<br />
* [http://www.opengeospatial.org OGC] [http://www.opengeospatial.org/standards/wmc Web Map Context]<br />
* OGC [http://www.opengeospatial.org/standards/gml Geography Markup Language (GML)]<br />
* OGC [http://www.opengeospatial.org/standards/wfs Web Feature Service (WFS)], with an emphasis on [http://www.ogcnetwork.net/wfssimple WFS Simple]<br />
* Others...<br />
<br />
== Useful links ==<br />
<br />
* [http://icon.stoa.org/trac/pleiades/wiki/GeoJSON GeoJSON] - one of the first attempts to encode geographic data in JSON (with the name kindly donated to this effort)<br />
* [http://jdil.org/ JIDL] - "describes a simple scheme for implementing namespaced vocabularies in JSON"<br />
* [http://lists.burri.to/pipermail/geowanking/2007-February/thread.html Geowanking mailing list thread "JSON for GEO"]</div>Mpdhttp://wiki.geojson.org/index.php?title=Main_Page&diff=6Main Page2007-03-12T10:28:51Z<p>Mpd: </p>
<hr />
<div>== GeoJSON ==<br />
<br />
* [[What_is_JSON%3F|What is JSON?]]<br />
* [[What_is_GeoJSON%3F|What is GeoJSON?]]</div>Mpdhttp://wiki.geojson.org/index.php?title=What_is_JSON%3F&diff=4What is JSON?2007-03-12T10:27:42Z<p>Mpd: What is JSON moved to What is JSON?</p>
<hr />
<div>“JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. ... JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.” – http://json.org<br />
<br />
In JSON, an object is an unordered set of name/value pairs with a restricted set of values: string, number, object, array, true, false, null. An object contains an array of values. Because one of the supported value types is object, JSON supports nested object definitions.<br />
<br />
In JavaScript, JSON can be converted to and from a JavaScript variable with a single procedure call.<br />
<br />
== JSON and XML ==<br />
<br />
“Unfortunately, XML is not well suited to data-interchange, much as a wrench is not well-suited to driving nails. It carries a lot of baggage, and it doesn't match the data model of most programming languages. When most programmers saw XML for the first time, they were shocked at how ugly and inefficient it was. It turns out that that first reaction was the correct one. There is another text notation that has all of the advantages of XML, but is much better suited to data-interchange. That notation is JavaScript Object Notation (JSON).” – http://json.org/xml.html</div>Mpdhttp://wiki.geojson.org/index.php?title=What_is_JSON&diff=5What is JSON2007-03-12T10:27:42Z<p>Mpd: What is JSON moved to What is JSON?</p>
<hr />
<div>#REDIRECT [[What is JSON?]]</div>Mpdhttp://wiki.geojson.org/index.php?title=What_is_JSON%3F&diff=3What is JSON?2007-03-12T10:25:49Z<p>Mpd: New page: “JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. ... JSON is a text fo...</p>
<hr />
<div>“JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. ... JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.” – http://json.org<br />
<br />
In JSON, an object is an unordered set of name/value pairs with a restricted set of values: string, number, object, array, true, false, null. An object contains an array of values. Because one of the supported value types is object, JSON supports nested object definitions.<br />
<br />
In JavaScript, JSON can be converted to and from a JavaScript variable with a single procedure call.<br />
<br />
== JSON and XML ==<br />
<br />
“Unfortunately, XML is not well suited to data-interchange, much as a wrench is not well-suited to driving nails. It carries a lot of baggage, and it doesn't match the data model of most programming languages. When most programmers saw XML for the first time, they were shocked at how ugly and inefficient it was. It turns out that that first reaction was the correct one. There is another text notation that has all of the advantages of XML, but is much better suited to data-interchange. That notation is JavaScript Object Notation (JSON).” – http://json.org/xml.html</div>Mpdhttp://wiki.geojson.org/index.php?title=Main_Page&diff=2Main Page2007-03-12T10:17:44Z<p>Mpd: </p>
<hr />
<div>== GeoJSON ==<br />
<br />
* [[What_is_JSON|What is JSON?]]<br />
* [[What_is_GeoJSON|What is GeoJSON?]]</div>Mpd