GeoJSON Text Sequences
Mapbox
sean.gillies@gmail.com
http://sgillies.net
General
GeoJSON
JSON
Geospatial
JavaScript Object Notation
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.
Arbitrarily large sequences of values pose a problem for JavaScript Object
Notation (JSON) that is well explained in the motivation for JSON
text sequences . The GeoJSON format 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.
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 .
Defined in prose similar to the description of the JSON text sequence in , a GeoJSON text sequence is any
number of GeoJSON texts, each encoded in UTF-8 ,
preceded by one ASCII record separator (RS) character,
and followed by a line feed
(LF).
The GeoJSON text sequence format conforms to all the rules of and
adds the following constraint: each JSON text MUST contain a single GeoJSON
object as defined in .
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 text sequences have no security considerations beyond those of JSON
text sequences and the GeoJSON format .
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.
The MIME media type for GeoJSON text sequences is
"application/geo+json-seq" (which uses the suffix
established in ). IANA has registered it in the "Media
Types" registry <https://www.iana.org/assignments/media-types/>.
application
geo+json-seq
n/a
n/a
binary
See of RFC 8142
See of
RFC 8142
RFC 8142
Geographic information systems (GIS)
n/a
n/a
n/a
n/a
Sean Gillies
(sean.gillies@gmail.com)
COMMON
none
Sean Gillies (sean.gillies@gmail.com)
IETF