8142
PROPOSED STANDARD

GeoJSON Text Sequences

Authors: S. Gillies
Date: April 2017
Area: art
Working Group: geojson
Stream: IETF

Abstract

This document describes the GeoJSON text sequence format and "application/geo+json-seq" media type. This format is based on JavaScript Object Notation (JSON) text sequences and GeoJSON, and it makes arbitrarily large geographic datasets incrementally parseable without restricting the form of GeoJSON texts within a sequence.

RFC 8142: GeoJSON Text Sequences [RFC Home] [TEXT|PDF|HTML] [Tracker] [IPR] [Info page]

PROPOSED STANDARD
Internet Engineering Task Force (IETF)                        S. Gillies
Request for Comments: 8142                                        Mapbox
Category: Standards Track                                     April 2017
ISSN: 2070-1721


                         <span class="h1">GeoJSON Text Sequences</span>

Abstract

   This document describes the GeoJSON text sequence format and
   "application/geo+json-seq" media type.  This format is based on
   JavaScript Object Notation (JSON) text sequences and GeoJSON, and it
   makes arbitrarily large geographic datasets incrementally parseable
   without restricting the form of GeoJSON texts within a sequence.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in <a href="./rfc7841#section-2">Section 2 of RFC 7841</a>.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   <a href="https://www.rfc-editor.org/info/rfc8142">http://www.rfc-editor.org/info/rfc8142</a>.

Copyright Notice

   Copyright (c) 2017 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.







<span class="grey">Gillies                      Standards Track                    [Page 1]</span>

<span id="page-2" ></span>
<span class="grey"><a href="./rfc8142">RFC 8142</a>                 GeoJSON Text Sequences               April 2017</span>


Table of Contents

   <a href="#section-1">1</a>. Introduction ....................................................<a href="#page-2">2</a>
      <a href="#section-1.1">1.1</a>. Requirements Language ......................................<a href="#page-2">2</a>
   <a href="#section-2">2</a>. GeoJSON Text Sequence Format ....................................<a href="#page-2">2</a>
   <a href="#section-3">3</a>. Security Considerations .........................................<a href="#page-3">3</a>
   <a href="#section-4">4</a>. Interoperability Considerations .................................<a href="#page-3">3</a>
   <a href="#section-5">5</a>. IANA Considerations .............................................<a href="#page-3">3</a>
   <a href="#section-6">6</a>. References ......................................................<a href="#page-4">4</a>
      <a href="#section-6.1">6.1</a>. Normative References .......................................<a href="#page-4">4</a>
      <a href="#section-6.2">6.2</a>. Informative References .....................................<a href="#page-5">5</a>
   Author's Address ...................................................<a href="#page-5">5</a>

<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>.  Introduction</span>

   Arbitrarily large sequences of values pose a problem for JavaScript
   Object Notation (JSON) [<a href="./rfc7159" title=""The JavaScript Object Notation (JSON) Data Interchange Format"">RFC7159</a>] that is well explained in the
   motivation for JSON text sequences [<a href="./rfc7464" title=""JavaScript Object Notation (JSON) Text Sequences"">RFC7464</a>].  The GeoJSON format
   [<a href="./rfc7946" title=""The GeoJSON Format"">RFC7946</a>] faces the same kind of problem.  Geographic datasets often
   run to the tens of thousands or millions of features.  The problem is
   often amplified by the presence of large arrays of coordinates for
   each of the features.

   This document describes a specialization of JSON text sequences.  A
   GeoJSON text sequence is a document of arbitrarily large size
   containing one or more GeoJSON objects (e.g., multiple GeoJSON texts
   that can be produced and parsed incrementally) and not just a single
   GeoJSON FeatureCollection, Feature, or Geometry.

<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>.  Requirements Language</span>

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].

<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>.  GeoJSON Text Sequence Format</span>

   Defined in prose similar to the description of the JSON text sequence
   in [<a href="./rfc7464" title=""JavaScript Object Notation (JSON) Text Sequences"">RFC7464</a>], a GeoJSON text sequence is any number of GeoJSON
   [<a href="./rfc7946" title=""The GeoJSON Format"">RFC7946</a>] texts, each encoded in UTF-8 [<a href="./rfc3629" title=""UTF-8, a transformation format of ISO 10646"">RFC3629</a>], preceded by one
   ASCII [<a href="./rfc20" title=""ASCII format for network interchange"">RFC20</a>] record separator (RS) character, and followed by a line
   feed (LF).

   The GeoJSON text sequence format conforms to all the rules of
   [<a href="./rfc7464" title=""JavaScript Object Notation (JSON) Text Sequences"">RFC7464</a>] and adds the following constraint: each JSON text MUST
   contain a single GeoJSON object as defined in [<a href="./rfc7946" title=""The GeoJSON Format"">RFC7946</a>].




<span class="grey">Gillies                      Standards Track                    [Page 2]</span>

<span id="page-3" ></span>
<span class="grey"><a href="./rfc8142">RFC 8142</a>                 GeoJSON Text Sequences               April 2017</span>


   Heterogeneous sequences containing a mix of GeoJSON Geometry,
   Feature, and FeatureCollection objects are permitted.  How producers
   and parsers of GeoJSON text sequences communicate rules for allowed
   GeoJSON types in exchanged sequences is not specified in this
   document.

<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>.  Security Considerations</span>

   GeoJSON text sequences have no security considerations beyond those
   of JSON text sequences [<a href="./rfc7464" title=""JavaScript Object Notation (JSON) Text Sequences"">RFC7464</a>] and the GeoJSON format [<a href="./rfc7946" title=""The GeoJSON Format"">RFC7946</a>].

<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>.  Interoperability Considerations</span>

   The advantage of using ASCII character RS "0x1e" to denote a text is
   that sequence producers and parsers need not enforce a canonical form
   of GeoJSON.  Any valid GeoJSON, pretty-printed or compact, can be
   used in a GeoJSON text sequence.

   A variety of parsers designed for newline-delimited sequences of
   compact JSON text are deployed on the internet today.  While there is
   no canonical form for JSON texts, and pretty-printed and compact
   forms are equally valid, GeoJSON text sequences containing compact
   GeoJSON texts with no internal newlines are more interoperable with
   existing non-standardized parsers.

   In a distributed system where order and exactly-once delivery of
   messages are difficult to achieve, GeoJSON text sequences that do not
   rely on order of texts for extra semantics are more interoperable
   than those that do.

<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>.  IANA Considerations</span>

   The MIME media type for GeoJSON text sequences is "application/
   geo+json-seq" (which uses the suffix established in [<a href="./rfc8091" title=""A Media Type Structured Syntax Suffix for JSON Text Sequences"">RFC8091</a>]).  IANA
   has registered it in the "Media Types" registry
   <<a href="https://www.iana.org/assignments/media-types/">https://www.iana.org/assignments/media-types/</a>>.

   Type name:  application

   Subtype name:  geo+json-seq

   Required parameters:  n/a

   Optional parameters:  n/a

   Encoding considerations:  binary

   Security considerations:  See <a href="./rfc8142#section-3">Section 3 of RFC 8142</a>



<span class="grey">Gillies                      Standards Track                    [Page 3]</span>

<span id="page-4" ></span>
<span class="grey"><a href="./rfc8142">RFC 8142</a>                 GeoJSON Text Sequences               April 2017</span>


   Interoperability considerations:  See <a href="./rfc8142#section-4">Section 4 of RFC 8142</a>

   Published specification:  <a href="./rfc8142">RFC 8142</a>

   Applications that use this media type: Geographic information
      systems (GIS)

   Additional information:

      Deprecated alias names for this type:  n/a

      Magic number(s):  n/a

      File extension(s):  n/a

      Macintosh file type code(s):  n/a

   Person to contact for further information: Sean Gillies
      ([email protected])

   Intended usage:  COMMON

   Restrictions on usage:  none

   Author:  Sean Gillies ([email protected])

   Change controller:  IETF

<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>.  References</span>

<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>.  Normative References</span>

   [<a id="ref-RFC20">RFC20</a>]    Cerf, V., "ASCII format for network interchange", STD 80,
              <a href="./rfc20">RFC 20</a>, DOI 10.17487/RFC0020, October 1969,
              <<a href="https://www.rfc-editor.org/info/rfc20">http://www.rfc-editor.org/info/rfc20</a>>.

   [<a id="ref-RFC2119">RFC2119</a>]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
              DOI 10.17487/RFC2119, March 1997,
              <<a href="https://www.rfc-editor.org/info/rfc2119">http://www.rfc-editor.org/info/rfc2119</a>>.

   [<a id="ref-RFC3629">RFC3629</a>]  Yergeau, F., "UTF-8, a transformation format of ISO
              10646", STD 63, <a href="./rfc3629">RFC 3629</a>, DOI 10.17487/RFC3629, November
              2003, <<a href="https://www.rfc-editor.org/info/rfc3629">http://www.rfc-editor.org/info/rfc3629</a>>.

   [<a id="ref-RFC7159">RFC7159</a>]  Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
              Interchange Format", <a href="./rfc7159">RFC 7159</a>, DOI 10.17487/RFC7159, March
              2014, <<a href="https://www.rfc-editor.org/info/rfc7159">http://www.rfc-editor.org/info/rfc7159</a>>.



<span class="grey">Gillies                      Standards Track                    [Page 4]</span>

<span id="page-5" ></span>
<span class="grey"><a href="./rfc8142">RFC 8142</a>                 GeoJSON Text Sequences               April 2017</span>


   [<a id="ref-RFC7464">RFC7464</a>]  Williams, N., "JavaScript Object Notation (JSON) Text
              Sequences", <a href="./rfc7464">RFC 7464</a>, DOI 10.17487/RFC7464, February 2015,
              <<a href="https://www.rfc-editor.org/info/rfc7464">http://www.rfc-editor.org/info/rfc7464</a>>.

   [<a id="ref-RFC7946">RFC7946</a>]  Butler, H., Daly, M., Doyle, A., Gillies, S., Hagen, S.,
              and T. Schaub, "The GeoJSON Format", <a href="./rfc7946">RFC 7946</a>,
              DOI 10.17487/RFC7946, August 2016,
              <<a href="https://www.rfc-editor.org/info/rfc7946">http://www.rfc-editor.org/info/rfc7946</a>>.

<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>.  Informative References</span>

   [<a id="ref-RFC8091">RFC8091</a>]  Wilde, E., "A Media Type Structured Syntax Suffix for JSON
              Text Sequences", <a href="./rfc8091">RFC 8091</a>, DOI 10.17487/RFC8091, February
              2017, <<a href="https://www.rfc-editor.org/info/rfc8091">http://www.rfc-editor.org/info/rfc8091</a>>.

Author's Address

   Sean Gillies
   Mapbox

   Email: [email protected]
   URI:   <a href="http://sgillies.net">http://sgillies.net</a>





























Gillies                      Standards Track                    [Page 5]

Additional Resources