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

GeoJSON Text Sequences

GeoJSON文本序列

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.

本文档描述了GeoJSON文本序列格式和“应用程序/geo+json-seq”媒体类型。这种格式基于JavaScript对象表示法(JSON)文本序列和GeoJSON,它使任意大的地理数据集可以增量解析,而不限制序列中GeoJSON文本的形式。

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 Section 2 of RFC 7841.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 7841第2节。

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

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问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.

版权所有(c)2017 IETF信托基金和确定为文件作者的人员。版权所有。

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 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.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

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 ....................................................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
1. 介绍

Arbitrarily large sequences of values pose a problem for JavaScript Object Notation (JSON) [RFC7159] that is well explained in the motivation for JSON text sequences [RFC7464]. The GeoJSON format [RFC7946] 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.

任意大的值序列会给JavaScript对象表示法(JSON)[RFC7159]带来问题,这在JSON文本序列的动机[RFC7464]中得到了很好的解释。GeoJSON格式[RFC7946]也面临同样的问题。地理数据集通常包含数万或数百万个要素。每个特征都有大量的坐标阵列,这往往会加剧问题。

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.

本文档描述了JSON文本序列的专门化。GeoJSON文本序列是任意大的文档,包含一个或多个GeoJSON对象(例如,可以增量生成和解析的多个GeoJSON文本),而不仅仅是单个GeoJSON FeatureCollection、Feature或Geometry。

1.1. Requirements Language
1.1. 需求语言

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].

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”应按照[RFC2119]中的说明进行解释。

2. GeoJSON Text Sequence Format
2. GeoJSON文本序列格式

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 encoded in UTF-8 [RFC3629], preceded by one ASCII [RFC20] record separator (RS) character, and followed by a line feed (LF).

GeoJSON文本序列以类似于[RFC7464]中JSON文本序列描述的散文形式定义,是任意数量的GeoJSON[RFC7946]文本,每个文本以UTF-8[RFC3629]编码,前面是一个ASCII[RFC20]记录分隔符(RS)字符,后面是换行符(LF)。

The GeoJSON text sequence format conforms to all the rules of [RFC7464] and adds the following constraint: each JSON text MUST contain a single GeoJSON object as defined in [RFC7946].

GeoJSON文本序列格式符合[RFC7464]的所有规则,并添加了以下约束:每个JSON文本必须包含[RFC7946]中定义的单个GeoJSON对象。

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.

允许混合包含GeoJSON几何体、Feature和FeatureCollection对象的异构序列。GeoJSON文本序列的生产者和解析器如何在交换序列中传递允许的GeoJSON类型的规则,本文档中未指定。

3. Security Considerations
3. 安全考虑

GeoJSON text sequences have no security considerations beyond those of JSON text sequences [RFC7464] and the GeoJSON format [RFC7946].

除了JSON文本序列[RFC7464]和GeoJSON格式[RFC7946]之外,GeoJSON文本序列没有其他安全考虑。

4. Interoperability Considerations
4. 互操作性注意事项

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.

使用ASCII字符RS“0x1e”表示文本的优点是序列生成器和解析器不需要强制执行GeoJSON的规范形式。任何有效的GeoJSON(打印精美或紧凑)都可以在GeoJSON文本序列中使用。

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.

如今,互联网上部署了各种各样的解析器,用于以换行符分隔的紧凑JSON文本序列。虽然JSON文本没有标准格式,打印精美的格式和紧凑的格式同样有效,但包含紧凑的GeoJSON文本(没有内部换行符)的GeoJSON文本序列与现有的非标准解析器更具互操作性。

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.

在一个分布式系统中,消息的顺序和一次传递都很难实现,不依赖文本顺序获得额外语义的GeoJSON文本序列比依赖文本顺序的GeoJSON文本序列具有更好的互操作性。

5. IANA Considerations
5. IANA考虑

The MIME media type for GeoJSON text sequences is "application/ geo+json-seq" (which uses the suffix established in [RFC8091]). IANA has registered it in the "Media Types" registry <https://www.iana.org/assignments/media-types/>.

GeoJSON文本序列的MIME媒体类型为“application/geo+json seq”(使用[RFC8091]中建立的后缀)。IANA已在“媒体类型”注册表中注册<https://www.iana.org/assignments/media-types/>.

Type name: application

类型名称:应用程序

Subtype name: geo+json-seq

子类型名称:geo+json seq

Required parameters: n/a

所需参数:不适用

Optional parameters: n/a

可选参数:不适用

Encoding considerations: binary

编码注意事项:二进制

Security considerations: See Section 3 of RFC 8142

安全注意事项:见RFC 8142第3节

Interoperability considerations: See Section 4 of RFC 8142

互操作性注意事项:参见RFC 8142第4节

Published specification: RFC 8142

已发布规范:RFC 8142

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

使用此媒体类型的应用程序:地理信息系统(GIS)

Additional information:

其他信息:

Deprecated alias names for this type: n/a

此类型的已弃用别名:不适用

      Magic number(s):  n/a
        
      Magic number(s):  n/a
        
      File extension(s):  n/a
        
      File extension(s):  n/a
        
      Macintosh file type code(s):  n/a
        
      Macintosh file type code(s):  n/a
        

Person to contact for further information: Sean Gillies (sean.gillies@gmail.com)

有关更多信息的联系人:Sean Gillies(Sean。gillies@gmail.com)

Intended usage: COMMON

预期用途:普通

Restrictions on usage: none

使用限制:无

Author: Sean Gillies (sean.gillies@gmail.com)

作者:肖恩·吉利斯(肖恩。gillies@gmail.com)

Change controller: IETF

更改控制器:IETF

6. References
6. 工具书类
6.1. Normative References
6.1. 规范性引用文件

[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>.

[RFC20]Cerf,V.,“网络交换的ASCII格式”,STD 80,RFC 20,DOI 10.17487/RFC0020,1969年10月<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>.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<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>.

[RFC3629]Yergeau,F.,“UTF-8,ISO 10646的转换格式”,STD 63,RFC 3629,DOI 10.17487/RFC3629,2003年11月<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>.

[RFC7159]Bray,T.,Ed.“JavaScript对象表示法(JSON)数据交换格式”,RFC 7159,DOI 10.17487/RFC7159,2014年3月<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>.

[RFC7464]Williams,N.,“JavaScript对象表示法(JSON)文本序列”,RFC 7464,DOI 10.17487/RFC7464,2015年2月<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>.

[RFC7946]Butler,H.,Daly,M.,Doyle,A.,Gillies,S.,Hagen,S.,和T.Schaub,“GeoJSON格式”,RFC 7946,DOI 10.17487/RFC7946,2016年8月<http://www.rfc-editor.org/info/rfc7946>.

6.2. Informative References
6.2. 资料性引用

[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>.

[RFC8091]Wilde,E.“JSON文本序列的媒体类型结构化语法后缀”,RFC 8091,DOI 10.17487/RFC8091,2017年2月<http://www.rfc-editor.org/info/rfc8091>.

Author's Address

作者地址

Sean Gillies Mapbox

肖恩·吉利斯地图盒

   Email: sean.gillies@gmail.com
   URI:   http://sgillies.net
        
   Email: sean.gillies@gmail.com
   URI:   http://sgillies.net