http://wiki.geojson.org/api.php?action=feedcontributions&user=AllanDoyle&feedformat=atomGeoJSON - User contributions [en]2024-03-28T19:50:27ZUser contributionsMediaWiki 1.26.3http://wiki.geojson.org/index.php?title=Main_Page&diff=111Main Page2007-05-30T15:35:21Z<p>AllanDoyle: Added link to 1.0RC1</p>
<hr />
<div>== GeoJSON ==<br />
<br />
* [[What_is_JSON%3F|What is JSON?]]<br />
* [[What_is_GeoJSON%3F|What is GeoJSON?]]<br />
<br />
== Specification ==<br />
*[[GeoJSON_1.0_RC_1]] - Release Candidate 1 for GeoJSON 1.0<br />
<br />
== RFCs ==<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]<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</div>AllanDoylehttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_5&diff=109GeoJSON draft version 52007-05-30T15:33:23Z<p>AllanDoyle: RFC-2 moved to GeoJSON 1.0 RC 1: It's nearly ready!</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: "crs": {"type": "EPSG", "properties": {"code": 4267}}. "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": 4326}<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 />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>AllanDoylehttp://wiki.geojson.org/index.php?title=RFC-2&diff=110RFC-22007-05-30T15:33:23Z<p>AllanDoyle: RFC-2 moved to GeoJSON 1.0 RC 1: It's nearly ready!</p>
<hr />
<div>#REDIRECT [[GeoJSON 1.0 RC 1]]</div>AllanDoylehttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_5&diff=108GeoJSON draft version 52007-05-30T15:30:59Z<p>AllanDoyle: /* Specification */ Put in a note that no "crs" is better than "crs" for EPSG:4326</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: "crs": {"type": "EPSG", "properties": {"code": 4267}}. "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": 4326}<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 />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>AllanDoylehttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_5&diff=107GeoJSON draft version 52007-05-30T15:29:49Z<p>AllanDoyle: /* Specification */ Put in language about case of names, values.</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: "crs": {"type": "EPSG", "properties": {"code": 4267}}. "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 />
<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": 4326}<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 />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>AllanDoylehttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_5&diff=106GeoJSON draft version 52007-05-30T15:21:27Z<p>AllanDoyle: /* Specification */ Changed crs example from 4326 to 4267.</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"<br />
## A geometry is a GeoJSON object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "Box".<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: "crs": {"type": "EPSG", "properties": {"code": 4267}}<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 />
<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": 4326}<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 />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>AllanDoylehttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_5&diff=105GeoJSON draft version 52007-05-29T18:17:44Z<p>AllanDoyle: /* Specification */ typo repair</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"<br />
## A geometry is a GeoJSON object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "Box".<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: "crs": {"type": "EPSG", "properties": {"code": 4326}}<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 />
<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": 4326}<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 />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>AllanDoylehttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_5&diff=104GeoJSON draft version 52007-05-29T18:16:24Z<p>AllanDoyle: /* Specification */ typo repair</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"<br />
## A geometry is a GeoJSON object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "Box".<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 an 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: "crs": {"type": "EPSG", "properties": {"code": 4326}}<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 />
<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": 4326}<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 />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>AllanDoylehttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_5&diff=103GeoJSON draft version 52007-05-29T18:13:34Z<p>AllanDoyle: CRS - moved WGS 84 to beginning of the description. Got rid of the "if no crs, then client/server have mutual understanding" since that was ambiguous.</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"<br />
## A geometry is a GeoJSON object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "Box".<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 geomety 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 an 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: "crs": {"type": "EPSG", "properties": {"code": 4326}}<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 />
<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": 4326}<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 />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>AllanDoylehttp://wiki.geojson.org/index.php?title=GeoJSON_draft_version_5&diff=101GeoJSON draft version 52007-05-25T14:10:01Z<p>AllanDoyle: Copied Authors over from RFC-001, added Tim to the top of the list. Add yourself if you helped!</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"<br />
## A geometry is a GeoJSON object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "Box".<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 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 geomety 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 may have an 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. If a GeoJSON object does not have a member named "crs", it is assumed that the server and client have a mutual understanding about the coordinate reference system of the included geometries. Clients may assume that a GeoJSON data structure without a member named "crs" contains geometries in a Geographic projection, in the WGS84 datum, with units in decimal degrees.<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: "crs": {"type": "EPSG", "properties": {"code": 4326}}<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 />
<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": 4326}<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 />
==Authors==<br />
* Tim Schaub<br />
* Allan Doyle<br />
* Sean Gillies<br />
* Martin Daly</div>AllanDoylehttp://wiki.geojson.org/index.php?title=Main_Page&diff=100Main Page2007-05-25T14:06:30Z<p>AllanDoyle: Added (Deprecated) to RFC-001</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]] (Deprecated)<br />
*[[RFC-2]]<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/#geojson #geojson] channel on irc.freenode.net</div>AllanDoylehttp://wiki.geojson.org/index.php?title=RFC-001&diff=99RFC-0012007-05-25T14:02:50Z<p>AllanDoyle: Added notice that people should look at RFC-2.</p>
<hr />
<div>== NOTICE ==<br />
This is historical material. This page has been superseded by [[RFC-2]]. <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 />
# 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>AllanDoylehttp://wiki.geojson.org/index.php?title=RFC-001&diff=57RFC-0012007-04-12T20:54:17Z<p>AllanDoyle: /* Examples */ Fixed wiki markup to allow </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 | Line | Polygon | Box]<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 Line must have at least two coordinates.<br />
#** A Polygon must have at least three coordinates.<br />
#** A Box must have exactly two coordinates.<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 />
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 />
==Authors==<br />
* Allan Doyle<br />
* Sean Gillies</div>AllanDoylehttp://wiki.geojson.org/index.php?title=RFC-001&diff=56RFC-0012007-04-12T20:53:09Z<p>AllanDoyle: /* Examples */ updated example to </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 | Line | Polygon | Box]<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 Line must have at least two coordinates.<br />
#** A Polygon must have at least three coordinates.<br />
#** A Box must have exactly two coordinates.<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 />
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": [[-105.8, 40.05]],<br />
}<br />
}<br />
<br />
==Authors==<br />
* Allan Doyle<br />
* Sean Gillies</div>AllanDoylehttp://wiki.geojson.org/index.php?title=RFC-001&diff=55RFC-0012007-04-12T20:52:28Z<p>AllanDoyle: /* Specification */ Changed definition of coordinates so Point has x,y or x,y,z notation.</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 | Line | Polygon | Box]<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 Line must have at least two coordinates.<br />
#** A Polygon must have at least three coordinates.<br />
#** A Box must have exactly two coordinates.<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 />
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": [-105.8, 40.05],<br />
}<br />
}<br />
<br />
==Authors==<br />
* Allan Doyle<br />
* Sean Gillies</div>AllanDoylehttp://wiki.geojson.org/index.php?title=Talk:RFC-001&diff=54Talk:RFC-0012007-04-12T13:13:32Z<p>AllanDoyle: Response to 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]]<br />
<br />
== [[User:AllanDoyle|AllanDoyle]] Response ==<br />
# Clearly this system of commenting on the comments is going to break down soon.<br />
# I mean literally taken from the file called 'epsg' which on my system installs into /Library/Frameworks/PROJ.framework/Versions/Current/Resources/proj/epsg. It looks sort of like this:<br />
# Unknown datum based upon the Airy 1830 ellipsoid<br />
<4001> +proj=longlat +ellps=airy +no_defs <><br />
# Unknown datum based upon the Airy Modified 1849 ellipsoid<br />
<4002> +proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs <><br />
# Unknown datum based upon the Australian National Spheroid<br />
<4003> +proj=longlat +ellps=aust_SA +no_defs <><br />
From that, the codes I mean are the ones in < >. There might be a better way to phrase this rule... But it boils down to not requiring people to find, read, and understand the EPSG tables themselves.<br />
# I believe you, let's add them. In fact, why not just say we'll allow geometries that have OGC WKT definitions. There must be a list somewhere.<br />
# If there's an OGC WKT, Quoits are in.<br />
#. Great.<br />
# You're welcome. (See, the numbering broke, and I don't have the wiki-fu to fix it).</div>AllanDoylehttp://wiki.geojson.org/index.php?title=RFC-001&diff=51RFC-0012007-04-11T13:06:08Z<p>AllanDoyle: Grammar correction</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 | Line | Polygon | Box]<br />
#* 'coordinates' - In the case of a Point, an array of two or three number values representing x, y, and optionally z. In all other cases, an array of arrays of number values as in Point, restricted as follows:<br />
#** A Line must have at least two values.<br />
#** A Polygon must have at least three values.<br />
#** A Box must have exactly two values.<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 />
from [http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol GISPython: Feature Protocol]<br />
{ <br />
'id': '1',<br />
'properties': {<br />
'title': u'Feature 1',<br />
'summary': u'The first feature',<br />
'link': http://example.org/features/1,<br />
}<br />
'geometry': {<br />
# WGS84 crs is implied<br />
'type': 'Point',<br />
'coordinates': [-105.8, 40.05],<br />
}<br />
}<br />
<br />
==Authors==<br />
* Allan Doyle<br />
* Sean Gillies (by inclusion - Sean - take this comment out if you're in)</div>AllanDoylehttp://wiki.geojson.org/index.php?title=RFC-001&diff=50RFC-0012007-04-11T12:56:19Z<p>AllanDoyle: </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 | Line | Polygon | Box]<br />
#* 'coordinates' - In the case of a Point, an array of two or three number values representing x, y, and optionally z. In all other cases, an array of arrays of number values as in Point, restricted as follows:<br />
#** A Line must have at least two values.<br />
#** A Polygon must have at least three values.<br />
#** A Box must have exactly two values.<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 which 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 />
from [http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol GISPython: Feature Protocol]<br />
{ <br />
'id': '1',<br />
'properties': {<br />
'title': u'Feature 1',<br />
'summary': u'The first feature',<br />
'link': http://example.org/features/1,<br />
}<br />
'geometry': {<br />
# WGS84 crs is implied<br />
'type': 'Point',<br />
'coordinates': [-105.8, 40.05],<br />
}<br />
}<br />
<br />
==Authors==<br />
* Allan Doyle<br />
* Sean Gillies (by inclusion - Sean - take this comment out if you're in)</div>AllanDoylehttp://wiki.geojson.org/index.php?title=RFC-001&diff=49RFC-0012007-04-11T12:55:58Z<p>AllanDoyle: Added Authors</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 | Line | Polygon | Box]<br />
#* 'coordinates' - In the case of a Point, an array of two or three number values representing x, y, and optionally z. In all other cases, an array of arrays of number values as in Point, restricted as follows:<br />
#** A Line must have at least two values.<br />
#** A Polygon must have at least three values.<br />
#** A Box must have exactly two values.<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 which 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 />
from [http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol GISPython: Feature Protocol]<br />
{ <br />
'id': '1',<br />
'properties': {<br />
'title': u'Feature 1',<br />
'summary': u'The first feature',<br />
'link': http://example.org/features/1,<br />
}<br />
'geometry': {<br />
# WGS84 crs is implied<br />
'type': 'Point',<br />
'coordinates': [-105.8, 40.05],<br />
}<br />
}<br />
<br />
==Authors==<br />
Allan Doyle<br />
Sean Gillies (by inclusion - Sean - take this comment out if you're in)</div>AllanDoylehttp://wiki.geojson.org/index.php?title=RFC-001&diff=48RFC-0012007-04-11T12:54:58Z<p>AllanDoyle: Change srs to crs</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 | Line | Polygon | Box]<br />
#* 'coordinates' - In the case of a Point, an array of two or three number values representing x, y, and optionally z. In all other cases, an array of arrays of number values as in Point, restricted as follows:<br />
#** A Line must have at least two values.<br />
#** A Polygon must have at least three values.<br />
#** A Box must have exactly two values.<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 which 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 />
from [http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol GISPython: Feature Protocol]<br />
{ <br />
'id': '1',<br />
'properties': {<br />
'title': u'Feature 1',<br />
'summary': u'The first feature',<br />
'link': http://example.org/features/1,<br />
}<br />
'geometry': {<br />
# WGS84 crs is implied<br />
'type': 'Point',<br />
'coordinates': [-105.8, 40.05],<br />
}<br />
}</div>AllanDoylehttp://wiki.geojson.org/index.php?title=Talk:RFC-001&diff=46Talk:RFC-0012007-04-11T12:51:14Z<p>AllanDoyle: </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.</div>AllanDoylehttp://wiki.geojson.org/index.php?title=Talk:RFC-001&diff=45Talk:RFC-0012007-04-11T12:50:20Z<p>AllanDoyle: </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] 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.</div>AllanDoylehttp://wiki.geojson.org/index.php?title=RFC-001&diff=43RFC-0012007-04-11T12:25:40Z<p>AllanDoyle: </p>
<hr />
<div>Inspired in part by http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol (or maybe even a complete copy with the exception of using 'srs' instead of 'crs'.)<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 | Line | Polygon | Box]<br />
#* 'coordinates' - In the case of a Point, an array of two or three number values representing x, y, and optionally z. In all other cases, an array of arrays of number values as in Point, restricted as follows:<br />
#** A Line must have at least two values.<br />
#** A Polygon must have at least three values.<br />
#** A Box must have exactly two values.<br />
#* 'srs' - an optional string specifying a spatial 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 srs 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 which 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.</div>AllanDoylehttp://wiki.geojson.org/index.php?title=RFC-001&diff=42RFC-0012007-04-11T12:18:21Z<p>AllanDoyle: Initial version of RFC-001</p>
<hr />
<div>Inspired in part by http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol<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 | Line | Polygon | Box]<br />
#* 'coordinates' - In the case of a Point, an array of two or three number values representing x, y, and optionally z. In all other cases, an array of arrays of number values as in Point, restricted as follows:<br />
#** A Line must have at least two values.<br />
#** A Polygon must have at least three values.<br />
#** A Box must have exactly two values.<br />
#* 'srs' - an optional string specifying a spatial 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 srs 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 which 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.</div>AllanDoylehttp://wiki.geojson.org/index.php?title=Main_Page&diff=41Main Page2007-04-11T12:03:11Z<p>AllanDoyle: </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 />
<br />
== Discussion list ==<br />
<br />
* [http://lists.geojson.org/listinfo.cgi/geojson-geojson.org http://lists.geojson.org/listinfo.cgi/geojson-geojson.org]</div>AllanDoyle