Rethinking CRS

From GeoJSON
Revision as of 18:36, 13 March 2008 by Sgillies (Talk | contribs)

Jump to: navigation, search

This is proposed new language for the CRS section of the spec (currently at draft version 5).

See also http://lists.geojson.org/pipermail/geojson-geojson.org/2008-March/000366.html

  1. Coordinate Reference Systems: The coordinate reference system (CRS) of a GeoJSON object is determined by its "crs" member. If an object has no "crs" member, its parent object's "crs" member may be acquired. If no CRS can be so acquired, the default CRS shall apply to the GeoJSON object.
    1. Default coordinate reference system: The default is a geographic coordinate reference system, using the WGS84 datum, and with longitude and latitude units of decimal degrees.
    2. The "crs" member: The value of a member named "crs" must be an object (referred to as the CRS object below).
    3. The CRS object: A CRS object has 2 mandatory members: "type", and "value".
      1. The "type" member: The value of this required member must be a string, indicating one of the 2 types of CRS objects: "name" (or "named"?), and "link" (or "linked"?).
      2. The "value" member: The value of this required member may be a string or object depending on the CRS object type (see below).
    4. CRS object types: There are 2 types of CRS objects.
      1. Named: A CRS object may indicate a coordinate reference system by name. The value of its "value" member must be a string. Values like "urn:ogc:def:crs:OGC:1.3:CRS84" shall be preferred over legacy names like "EPSG:4326".
        1. Example:
          "crs": {"type": "name", "value": "urn:ogc:def:crs:OGC:1.3:CRS84"}
      2. Linked: A CRS object may link to CRS parameters on the Web. In this case the value of its "value" member must be a Link object (see below).
      3. The Link object: A link object has 1 required member: "href", and 1 optional member: "type". The link object is similar to Atom/HTML/RSS links.
        1. The "href" member: The value of this required member must be a dereferenceable URI.
        2. The "type" member: The value of this optional member must be a string that hints at the format used to represent CRS parameters at the provided URI. Suggested values are: "proj4", "ogcwkt", "esriwkt", though others can be used.
        3. Example:
          "crs": {"type": "link", "value": {"href": "http://example.com/crs/42", "type": "proj4"}}
    5. Processing: It is not presumed that processors will understand all named or linked CRS.