RFC 8142
GeoJSON Text Sequences
Internet Engineering Task Force (IETF) π GeoJSON Text Sequences β¨
okay bestie, this one is RFC 8142 π and it's all about GeoJSON text sequences, which is giving streaming map data realness πΊοΈπ¦
Authored by Sean Gillies of Mapbox πΈ, published April 2017 π, and it's a Standards Track document π. It's from the IETF stream and its ISSN is 2070-1721 β¨. It doesn't obsolete or update anything, so it's a fresh start, no drama π
The abstract is the whole vibe: this describes the GeoJSON text sequence format and the "application/geo+json-seq" media type π§. It's built on JSON text sequences plus GeoJSON, and it makes arbitrarily large geographic datasets incrementally parseable without restricting the form of GeoJSON texts inside 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, received public review, and was approved for publication by the Internet Engineering Steering Group (IESG) π«Ά. More info on Internet Standards is in Section 2 of RFC 7841 β¨
Info about the current status, errata, and how to give feedback lives at http://www.rfc-editor.org/info/rfc8142 π¦
Copyright Notice π
Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved π
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the publication date π. Read these carefully, because they spell out your rights and restrictions π. 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 π
Table of Contents π§
1. Introduction ....................................................2
1.1. Requirements Language ......................................2
2. GeoJSON Text Sequence Format ....................................2
3. Security Considerations .........................................3
4. Interoperability Considerations .................................3
5. IANA Considerations .............................................3
6. References ......................................................4
6.1. Normative References .......................................4
6.2. Informative References .....................................5
Author's Address ...................................................5
1. Introduction πΈ
Arbitrarily large sequences of values are a problem for JavaScript Object Notation (JSON) [RFC7159], and the motivation for JSON text sequences [RFC7464] explains it really well π§ . The GeoJSON format [RFC7946] has the same issue π. Geographic datasets often run to tens of thousands or millions of features π, and it gets worse when each feature has big arrays of coordinates π
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 π¦. You can produce and parse them incrementally π₯, and it's not just one single GeoJSON FeatureCollection, Feature, or Geometry π
1.1. Requirements Language π
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 [RFC2119] π
2. GeoJSON Text Sequence Format π§
Defined in prose similar to the description of the JSON text sequence in [RFC7464] π, a GeoJSON text sequence is any number of GeoJSON [RFC7946] texts π. Each one is encoded in UTF-8 [RFC3629] π, preceded by one ASCII [RFC20] record separator (RS) character, and followed by a line feed (LF) β¨
The GeoJSON text sequence format conforms to all the rules of [RFC7464] and adds this constraint: each JSON text MUST contain a single GeoJSON object as defined in [RFC7946] π₯ no exceptions, bestie π
Heterogeneous sequences that mix GeoJSON Geometry, Feature, and FeatureCollection objects are permitted π¦. How producers and parsers communicate which GeoJSON types are allowed in exchanged sequences is not specified in this document π€·ββοΈ
3. Security Considerations π
GeoJSON text sequences have no security considerations beyond those of JSON text sequences [RFC7464] and the GeoJSON format [RFC7946] π so check those two docs, they're the real security tea β
4. Interoperability Considerations π«Ά
The advantage of using ASCII character RS "0x1e" to denote a text is that sequence producers and parsers don't have to enforce a canonical form of GeoJSON π. Any valid GeoJSON, pretty-printed or compact, can be used in a GeoJSON text sequence πΈ
A bunch of parsers built for newline-delimited sequences of compact JSON text are already deployed on the internet π. There's no canonical form for JSON texts, and pretty-printed and compact forms are equally valid π. But GeoJSON text sequences with compact GeoJSON texts that have no internal newlines play nicer with existing non-standardized parsers π§β¨
In a distributed system where order and exactly-once delivery of messages are hard to achieve, GeoJSON text sequences that don't rely on text order for extra semantics are more interoperable than ones that do π
5. IANA Considerations π
The MIME media type for GeoJSON text sequences is "application/geo+json-seq", which uses the suffix established in [RFC8091] π¦ IANA registered it in the "Media Types" registry (https://www.iana.org/assignments/media-types/) π
Type name: application
Subtype name: geo+json-seq
Required parameters: n/a
Optional parameters: n/a
Encoding considerations: binary
Security considerations: See Section 3 of RFC 8142
Interoperability considerations: See Section 4 of RFC 8142
Published specification: RFC 8142
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
(sean.gillies@gmail.com)
Intended usage: COMMON
Restrictions on usage: none
Author: Sean Gillies (sean.gillies@gmail.com)
Change controller: IETF
6. References π
6.1. Normative References π
[RFC20] Cerf, V., "ASCII format for network interchange", STD 80,
RFC 20, DOI 10.17487/RFC0020, October 1969,
<http://www.rfc-editor.org/info/rfc20>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November
2003, <http://www.rfc-editor.org/info/rfc3629>.
[RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March
2014, <http://www.rfc-editor.org/info/rfc7159>.
[RFC7464] Williams, N., "JavaScript Object Notation (JSON) Text
Sequences", RFC 7464, DOI 10.17487/RFC7464, February 2015,
<http://www.rfc-editor.org/info/rfc7464>.
[RFC7946] Butler, H., Daly, M., Doyle, A., Gillies, S., Hagen, S.,
and T. Schaub, "The GeoJSON Format", RFC 7946,
DOI 10.17487/RFC7946, August 2016,
<http://www.rfc-editor.org/info/rfc7946>.
6.2. Informative References π¦
[RFC8091] Wilde, E., "A Media Type Structured Syntax Suffix for JSON
Text Sequences", RFC 8091, DOI 10.17487/RFC8091, February
2017, <http://www.rfc-editor.org/info/rfc8091>.
Author's Address π
Sean Gillies Mapbox
Email: sean.gillies@gmail.com URI: http://sgillies.net
π¦ where this page comes from
- ietf: rfc8142 2017-04
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms