1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
|
Internet Engineering Task Force (IETF) S. Gillies
Request for Comments: 8142 Mapbox
Category: Standards Track April 2017
ISSN: 2070-1721
GeoJSON Text Sequences
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 Section 2 of RFC 7841.
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.
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 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.
Gillies Standards Track [Page 1]
^L
RFC 8142 GeoJSON Text Sequences April 2017
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 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.
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.
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 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 the following constraint: each JSON text MUST
contain a single GeoJSON object as defined in [RFC7946].
Gillies Standards Track [Page 2]
^L
RFC 8142 GeoJSON Text Sequences April 2017
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.
3. Security Considerations
GeoJSON text sequences have no security considerations beyond those
of JSON text sequences [RFC7464] and the GeoJSON format [RFC7946].
4. Interoperability Considerations
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.
5. IANA Considerations
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/>.
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
Gillies Standards Track [Page 3]
^L
RFC 8142 GeoJSON Text Sequences April 2017
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>.
Gillies Standards Track [Page 4]
^L
RFC 8142 GeoJSON Text Sequences April 2017
[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
Gillies Standards Track [Page 5]
^L
|