Difference between revisions of "RFC-001"
From GeoJSON
AllanDoyle (Talk | contribs) (Initial version of RFC-001) |
AllanDoyle (Talk | contribs) m |
||
Line 1: | Line 1: | ||
− | Inspired in part by http://trac.gispython.org/projects/PCL/wiki/PythonFeatureProtocol | + | 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'.) |
== Definitions == | == Definitions == |
Revision as of 04:25, 11 April 2007
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'.)
Definitions
- The terms object, name, value, array, and number are defined at http://json.org/
- The terms may, should, and must are defined at http://www.ietf.org/rfc/rfc2119.txt
Specification
- A feature is an object.
- 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.)
- The value of a geometry must itself be an object with the following name/value pairs:
- 'type' - [Point | Line | Polygon | Box]
- '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:
- A Line must have at least two values.
- A Polygon must have at least three values.
- A Box must have exactly two values.
- '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.
- 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.
- 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.
- 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.