Internet Engineering Task Force (IETF) H. Butler Request for Comments: 7946 Hobu Inc. Category: Standards Track M. Daly ISSN: 2070-1721 Cadcorp A. Doyle
Internet Engineering Task Force (IETF) H. Butler Request for Comments: 7946 Hobu Inc. Category: Standards Track M. Daly ISSN: 2070-1721 Cadcorp A. Doyle
S. Gillies Mapbox S. Hagen
S.Gillies地图盒S.Hagen
T. Schaub Planet Labs August 2016
T.Schaub行星实验室2016年8月
The GeoJSON Format
GeoJSON格式
Abstract
摘要
GeoJSON is a geospatial data interchange format based on JavaScript Object Notation (JSON). It defines several types of JSON objects and the manner in which they are combined to represent data about geographic features, their properties, and their spatial extents. GeoJSON uses a geographic coordinate reference system, World Geodetic System 1984, and units of decimal degrees.
GeoJSON是一种基于JavaScript对象表示法(JSON)的地理空间数据交换格式。它定义了几种类型的JSON对象及其组合方式,以表示有关地理特征、属性及其空间范围的数据。GeoJSON使用地理坐标参考系、1984年世界大地测量系统和十进制度数单位。
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/rfc7946.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7946.
Copyright Notice
版权公告
Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved.
版权所有(c)2016 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 . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 1.2. Conventions Used in This Document . . . . . . . . . . . . 4 1.3. Specification of GeoJSON . . . . . . . . . . . . . . . . 4 1.4. Definitions . . . . . . . . . . . . . . . . . . . . . . . 5 1.5. Example . . . . . . . . . . . . . . . . . . . . . . . . . 5 2. GeoJSON Text . . . . . . . . . . . . . . . . . . . . . . . . 6 3. GeoJSON Object . . . . . . . . . . . . . . . . . . . . . . . 6 3.1. Geometry Object . . . . . . . . . . . . . . . . . . . . . 7 3.1.1. Position . . . . . . . . . . . . . . . . . . . . . . 7 3.1.2. Point . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.3. MultiPoint . . . . . . . . . . . . . . . . . . . . . 8 3.1.4. LineString . . . . . . . . . . . . . . . . . . . . . 8 3.1.5. MultiLineString . . . . . . . . . . . . . . . . . . . 8 3.1.6. Polygon . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.7. MultiPolygon . . . . . . . . . . . . . . . . . . . . 9 3.1.8. GeometryCollection . . . . . . . . . . . . . . . . . 9 3.1.9. Antimeridian Cutting . . . . . . . . . . . . . . . . 10 3.1.10. Uncertainty and Precision . . . . . . . . . . . . . . 11 3.2. Feature Object . . . . . . . . . . . . . . . . . . . . . 11 3.3. FeatureCollection Object . . . . . . . . . . . . . . . . 12 4. Coordinate Reference System . . . . . . . . . . . . . . . . . 12 5. Bounding Box . . . . . . . . . . . . . . . . . . . . . . . . 12 5.1. The Connecting Lines . . . . . . . . . . . . . . . . . . 14 5.2. The Antimeridian . . . . . . . . . . . . . . . . . . . . 14 5.3. The Poles . . . . . . . . . . . . . . . . . . . . . . . . 14 6. Extending GeoJSON . . . . . . . . . . . . . . . . . . . . . . 15 6.1. Foreign Members . . . . . . . . . . . . . . . . . . . . . 15 7. GeoJSON Types Are Not Extensible . . . . . . . . . . . . . . 16 7.1. Semantics of GeoJSON Members and Types Are Not Changeable 16 8. Versioning . . . . . . . . . . . . . . . . . . . . . . . . . 17
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 1.2. Conventions Used in This Document . . . . . . . . . . . . 4 1.3. Specification of GeoJSON . . . . . . . . . . . . . . . . 4 1.4. Definitions . . . . . . . . . . . . . . . . . . . . . . . 5 1.5. Example . . . . . . . . . . . . . . . . . . . . . . . . . 5 2. GeoJSON Text . . . . . . . . . . . . . . . . . . . . . . . . 6 3. GeoJSON Object . . . . . . . . . . . . . . . . . . . . . . . 6 3.1. Geometry Object . . . . . . . . . . . . . . . . . . . . . 7 3.1.1. Position . . . . . . . . . . . . . . . . . . . . . . 7 3.1.2. Point . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.3. MultiPoint . . . . . . . . . . . . . . . . . . . . . 8 3.1.4. LineString . . . . . . . . . . . . . . . . . . . . . 8 3.1.5. MultiLineString . . . . . . . . . . . . . . . . . . . 8 3.1.6. Polygon . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.7. MultiPolygon . . . . . . . . . . . . . . . . . . . . 9 3.1.8. GeometryCollection . . . . . . . . . . . . . . . . . 9 3.1.9. Antimeridian Cutting . . . . . . . . . . . . . . . . 10 3.1.10. Uncertainty and Precision . . . . . . . . . . . . . . 11 3.2. Feature Object . . . . . . . . . . . . . . . . . . . . . 11 3.3. FeatureCollection Object . . . . . . . . . . . . . . . . 12 4. Coordinate Reference System . . . . . . . . . . . . . . . . . 12 5. Bounding Box . . . . . . . . . . . . . . . . . . . . . . . . 12 5.1. The Connecting Lines . . . . . . . . . . . . . . . . . . 14 5.2. The Antimeridian . . . . . . . . . . . . . . . . . . . . 14 5.3. The Poles . . . . . . . . . . . . . . . . . . . . . . . . 14 6. Extending GeoJSON . . . . . . . . . . . . . . . . . . . . . . 15 6.1. Foreign Members . . . . . . . . . . . . . . . . . . . . . 15 7. GeoJSON Types Are Not Extensible . . . . . . . . . . . . . . 16 7.1. Semantics of GeoJSON Members and Types Are Not Changeable 16 8. Versioning . . . . . . . . . . . . . . . . . . . . . . . . . 17
9. Mapping 'geo' URIs . . . . . . . . . . . . . . . . . . . . . 17 10. Security Considerations . . . . . . . . . . . . . . . . . . . 18 11. Interoperability Considerations . . . . . . . . . . . . . . . 18 11.1. I-JSON . . . . . . . . . . . . . . . . . . . . . . . . . 18 11.2. Coordinate Precision . . . . . . . . . . . . . . . . . . 18 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 20 13.1. Normative References . . . . . . . . . . . . . . . . . . 20 13.2. Informative References . . . . . . . . . . . . . . . . . 21 Appendix A. Geometry Examples . . . . . . . . . . . . . . . . . 22 A.1. Points . . . . . . . . . . . . . . . . . . . . . . . . . 22 A.2. LineStrings . . . . . . . . . . . . . . . . . . . . . . . 22 A.3. Polygons . . . . . . . . . . . . . . . . . . . . . . . . 23 A.4. MultiPoints . . . . . . . . . . . . . . . . . . . . . . . 24 A.5. MultiLineStrings . . . . . . . . . . . . . . . . . . . . 24 A.6. MultiPolygons . . . . . . . . . . . . . . . . . . . . . . 25 A.7. GeometryCollections . . . . . . . . . . . . . . . . . . . 26 Appendix B. Changes from the Pre-IETF GeoJSON Format Specification . . . . . . . . . . . . . . . . . . . 26 B.1. Normative Changes . . . . . . . . . . . . . . . . . . . . 26 B.2. Informative Changes . . . . . . . . . . . . . . . . . . . 27 Appendix C. GeoJSON Text Sequences . . . . . . . . . . . . . . . 27 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 27 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28
9. Mapping 'geo' URIs . . . . . . . . . . . . . . . . . . . . . 17 10. Security Considerations . . . . . . . . . . . . . . . . . . . 18 11. Interoperability Considerations . . . . . . . . . . . . . . . 18 11.1. I-JSON . . . . . . . . . . . . . . . . . . . . . . . . . 18 11.2. Coordinate Precision . . . . . . . . . . . . . . . . . . 18 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 20 13.1. Normative References . . . . . . . . . . . . . . . . . . 20 13.2. Informative References . . . . . . . . . . . . . . . . . 21 Appendix A. Geometry Examples . . . . . . . . . . . . . . . . . 22 A.1. Points . . . . . . . . . . . . . . . . . . . . . . . . . 22 A.2. LineStrings . . . . . . . . . . . . . . . . . . . . . . . 22 A.3. Polygons . . . . . . . . . . . . . . . . . . . . . . . . 23 A.4. MultiPoints . . . . . . . . . . . . . . . . . . . . . . . 24 A.5. MultiLineStrings . . . . . . . . . . . . . . . . . . . . 24 A.6. MultiPolygons . . . . . . . . . . . . . . . . . . . . . . 25 A.7. GeometryCollections . . . . . . . . . . . . . . . . . . . 26 Appendix B. Changes from the Pre-IETF GeoJSON Format Specification . . . . . . . . . . . . . . . . . . . 26 B.1. Normative Changes . . . . . . . . . . . . . . . . . . . . 26 B.2. Informative Changes . . . . . . . . . . . . . . . . . . . 27 Appendix C. GeoJSON Text Sequences . . . . . . . . . . . . . . . 27 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 27 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28
GeoJSON is a format for encoding a variety of geographic data structures using JavaScript Object Notation (JSON) [RFC7159]. A GeoJSON object may represent a region of space (a Geometry), a spatially bounded entity (a Feature), or a list of Features (a FeatureCollection). GeoJSON supports the following geometry types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. Features in GeoJSON contain a Geometry object and additional properties, and a FeatureCollection contains a list of Features.
GeoJSON是一种使用JavaScript对象表示法(JSON)对各种地理数据结构进行编码的格式[RFC7159]。GeoJSON对象可以表示空间区域(几何体)、空间边界实体(特征)或特征列表(特征集合)。GeoJSON支持以下几何体类型:点、线串、多边形、多点、多线串、多多边形和GeometryCollection。GeoJSON中的功能包含几何体对象和其他属性,FeatureCollection包含功能列表。
The format is concerned with geographic data in the broadest sense; anything with qualities that are bounded in geographical space might be a Feature whether or not it is a physical structure. The concepts in GeoJSON are not new; they are derived from preexisting open geographic information system standards and have been streamlined to better suit web application development using JSON.
格式涉及最广泛意义上的地理数据;任何在地理空间中具有一定性质的东西,无论是否是物理结构,都可能是一种特征。GeoJSON中的概念并不新鲜;它们源于现有的开放地理信息系统标准,并经过了优化,以更好地适应使用JSON的web应用程序开发。
GeoJSON comprises the seven concrete geometry types defined in the OpenGIS Simple Features Implementation Specification for SQL [SFSQL]: 0-dimensional Point and MultiPoint; 1-dimensional curve LineString and MultiLineString; 2-dimensional surface Polygon and MultiPolygon;
GeoJSON包含OpenGIS简单特性SQL[SFSQL]实现规范中定义的七种具体几何体类型:0维点和多点;一维曲线线串和多重线串;二维曲面多边形和多角形;
and the heterogeneous GeometryCollection. GeoJSON representations of instances of these geometry types are analogous to the well-known binary (WKB) and well-known text (WKT) representations described in that same specification.
以及非均匀几何收集。这些几何体类型实例的GeoJSON表示类似于同一规范中描述的已知二进制(WKB)和已知文本(WKT)表示。
GeoJSON also comprises the types Feature and FeatureCollection. Feature objects in GeoJSON contain a Geometry object with one of the above geometry types and additional members. A FeatureCollection object contains an array of Feature objects. This structure is analogous to that of the Web Feature Service (WFS) response to GetFeatures requests specified in [WFSv1] or to a Keyhole Markup Language (KML) Folder of Placemarks [KMLv2.2]. Some implementations of the WFS specification also provide GeoJSON-formatted responses to GetFeature requests, but there is no particular service model or Feature type ontology implied in the GeoJSON format specification.
GeoJSON还包括types功能和FeatureCollection。GeoJSON中的要素对象包含具有上述几何体类型之一和其他成员的几何体对象。FeatureCollection对象包含要素对象数组。此结构类似于Web功能服务(WFS)对[WFSv1]中指定的GetFeatures请求或Placemarks[KMLv2.2]的Keyhole Markup Language(KML)文件夹的响应。WFS规范的一些实现还为GetFeature请求提供GeoJSON格式的响应,但GeoJSON格式规范中没有隐含特定的服务模型或功能类型本体。
Since its initial publication in 2008 [GJ2008], the GeoJSON format specification has steadily grown in popularity. It is widely used in JavaScript web-mapping libraries, JSON-based document databases, and web APIs.
自2008年[GJ1008]首次发布以来,GeoJSON格式规范已稳步普及。它广泛用于JavaScript web映射库、基于JSON的文档数据库和web API。
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]中的说明进行解释。
The ordering of the members of any JSON object defined in this document MUST be considered irrelevant, as specified by [RFC7159].
按照[RFC7159]的规定,本文档中定义的任何JSON对象的成员顺序必须视为无关。
Some examples use the combination of a JavaScript single-line comment (//) followed by an ellipsis (...) as placeholder notation for content deemed irrelevant by the authors. These placeholders must of course be deleted or otherwise replaced, before attempting to validate the corresponding JSON code example.
一些示例使用JavaScript单行注释(//)和省略号(…)的组合作为占位符符号,表示作者认为无关的内容。当然,在尝试验证相应的JSON代码示例之前,必须删除或替换这些占位符。
Whitespace is used in the examples inside this document to help illustrate the data structures, but it is not required. Unquoted whitespace is not significant in JSON.
本文档中的示例中使用空格来帮助说明数据结构,但这不是必需的。在JSON中,不带引号的空格并不重要。
This document supersedes the original GeoJSON format specification [GJ2008].
本文件取代原GeoJSON格式规范[GJ1008]。
o JavaScript Object Notation (JSON), and the terms object, member, name, value, array, number, true, false, and null, are to be interpreted as defined in [RFC7159].
o JavaScript对象表示法(JSON)以及术语对象、成员、名称、值、数组、数字、真、假和空将按照[RFC7159]中的定义进行解释。
o Inside this document, the term "geometry type" refers to seven case-sensitive strings: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", and "GeometryCollection".
o 在本文档中,术语“几何体类型”指七个区分大小写的字符串:“点”、“多点”、“线串”、“多线串”、“多边形”、“多多边形”和“GeometryCollection”。
o As another shorthand notation, the term "GeoJSON types" refers to nine case-sensitive strings: "Feature", "FeatureCollection", and the geometry types listed above.
o 作为另一种简写符号,“GeoJSON类型”一词指九个区分大小写的字符串:“Feature”、“FeatureCollection”和上面列出的几何体类型。
o The word "Collection" in "FeatureCollection" and "GeometryCollection" does not have any significance for the semantics of array members. The "features" and "geometries" members, respectively, of these objects are standard ordered JSON arrays, not unordered sets.
o “FeatureCollection”和“GeometryCollection”中的“Collection”一词对于数组成员的语义没有任何意义。这些对象的“features”和“geometrics”成员分别是标准的有序JSON数组,而不是无序集。
A GeoJSON FeatureCollection:
GeoJSON功能集合:
{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }, { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0] ] }, "properties": {
{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }, { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0] ] }, "properties": {
"prop0": "value0", "prop1": 0.0 } }, { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] }, "properties": { "prop0": "value0", "prop1": { "this": "that" } } }] }
"prop0": "value0", "prop1": 0.0 } }, { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] }, "properties": { "prop0": "value0", "prop1": { "this": "that" } } }] }
A GeoJSON text is a JSON text and consists of a single GeoJSON object.
GeoJSON文本是JSON文本,由单个GeoJSON对象组成。
A GeoJSON object represents a Geometry, Feature, or collection of Features.
GeoJSON对象表示几何体、特征或特征集合。
o A GeoJSON object is a JSON object.
o GeoJSON对象是JSON对象。
o A GeoJSON object has a member with the name "type". The value of the member MUST be one of the GeoJSON types.
o GeoJSON对象有一个名为“type”的成员。成员的值必须是GeoJSON类型之一。
o A GeoJSON object MAY have a "bbox" member, the value of which MUST be a bounding box array (see Section 5).
o GeoJSON对象可能有一个“bbox”成员,其值必须是一个边界框数组(参见第5节)。
o A GeoJSON object MAY have other members (see Section 6).
o GeoJSON对象可能有其他成员(参见第6节)。
A Geometry object represents points, curves, and surfaces in coordinate space. Every Geometry object is a GeoJSON object no matter where it occurs in a GeoJSON text.
几何体对象表示坐标空间中的点、曲线和曲面。每个Geometry对象都是GeoJSON对象,无论它出现在GeoJSON文本中的何处。
o The value of a Geometry object's "type" member MUST be one of the seven geometry types (see Section 1.4).
o 几何体对象的“类型”成员的值必须是七种几何体类型之一(请参见第1.4节)。
o A GeoJSON Geometry object of any type other than "GeometryCollection" has a member with the name "coordinates". The value of the "coordinates" member is an array. The structure of the elements in this array is determined by the type of geometry. GeoJSON processors MAY interpret Geometry objects with empty "coordinates" arrays as null objects.
o 除“GeometryCollection”之外的任何类型的GeoJSON几何体对象都有一个名为“坐标”的成员。“坐标”成员的值是一个数组。此阵列中元素的结构由几何体的类型决定。GeoJSON处理器可以将具有空“坐标”数组的几何体对象解释为空对象。
A position is the fundamental geometry construct. The "coordinates" member of a Geometry object is composed of either:
位置是基本的几何构造。几何体对象的“坐标”成员由以下任一部分组成:
o one position in the case of a Point geometry,
o 对于点几何图形,为一个位置,
o an array of positions in the case of a LineString or MultiPoint geometry,
o 对于线串或多点几何图形,位置数组,
o an array of LineString or linear ring (see Section 3.1.6) coordinates in the case of a Polygon or MultiLineString geometry, or
o 对于多边形或多线几何体,线串或线性环(见第3.1.6节)坐标数组,或
o an array of Polygon coordinates in the case of a MultiPolygon geometry.
o 多多边形几何体中的多边形坐标数组。
A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.
位置是一组数字。必须有两个或多个元素。前两个元素是经度和纬度,或东距和北距,精确地按顺序并使用十进制数。海拔或海拔可以作为可选的第三要素。
Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers.
实现不应将位置扩展到三个元素之外,因为额外元素的语义未指定且不明确。历史上,一些实现使用第四个元素来携带线性引用度量(有时表示为“M”)或数字时间戳,但在大多数情况下,解析器将无法正确解释这些值。附加元素的解释和含义超出了本规范的范围,解析器可能会忽略附加元素。
A line between two positions is a straight Cartesian line, the shortest line between those two points in the coordinate reference system (see Section 4).
两个位置之间的直线是一条笛卡尔直线,即坐标参考系中这两个点之间的最短直线(见第4节)。
In other words, every point on a line that does not cross the antimeridian between a point (lon0, lat0) and (lon1, lat1) can be calculated as
换句话说,一条线上的每一个点,如果没有穿过点(lon0,lat0)和(lon1,lat1)之间的反导线,可以计算为
F(lon, lat) = (lon0 + (lon1 - lon0) * t, lat0 + (lat1 - lat0) * t)
F(lon, lat) = (lon0 + (lon1 - lon0) * t, lat0 + (lat1 - lat0) * t)
with t being a real number greater than or equal to 0 and smaller than or equal to 1. Note that this line may markedly differ from the geodesic path along the curved surface of the reference ellipsoid.
t是大于或等于0且小于或等于1的实数。请注意,该线可能与沿参考椭球曲面的测地线路径明显不同。
The same applies to the optional height element with the proviso that the direction of the height is as specified in the coordinate reference system.
这同样适用于可选的高度元素,但条件是高度的方向与坐标参照系中指定的方向相同。
Note that, again, this does not mean that a surface with equal height follows, for example, the curvature of a body of water. Nor is a surface of equal height perpendicular to a plumb line.
请注意,同样,这并不意味着具有相同高度的曲面遵循(例如)水体的曲率。垂直于铅垂线的等高表面也不存在。
Examples of positions and geometries are provided in Appendix A, "Geometry Examples".
位置和几何图形示例见附录A“几何图形示例”。
For type "Point", the "coordinates" member is a single position.
对于“点”类型,“坐标”成员是单个位置。
For type "MultiPoint", the "coordinates" member is an array of positions.
对于“MultiPoint”类型,“coordinates”成员是位置数组。
For type "LineString", the "coordinates" member is an array of two or more positions.
对于“LineString”类型,“坐标”成员是两个或多个位置的数组。
For type "MultiLineString", the "coordinates" member is an array of LineString coordinate arrays.
对于“MultiLineString”类型,“coordinates”成员是一组线串坐标数组。
To specify a constraint specific to Polygons, it is useful to introduce the concept of a linear ring:
要指定特定于多边形的约束,请引入线性环的概念:
o A linear ring is a closed LineString with four or more positions.
o 线性环是具有四个或更多位置的闭合线串。
o The first and last positions are equivalent, and they MUST contain identical values; their representation SHOULD also be identical.
o 第一个和最后一个位置是相等的,它们必须包含相同的值;它们的代表性也应相同。
o A linear ring is the boundary of a surface or the boundary of a hole in a surface.
o 线性环是曲面的边界或曲面中孔的边界。
o A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise.
o 线性环必须遵循其边界区域的右手法则,即外环为逆时针方向,孔为顺时针方向。
Note: the [GJ2008] specification did not discuss linear ring winding order. For backwards compatibility, parsers SHOULD NOT reject Polygons that do not follow the right-hand rule.
注:[GJ1008]规范未讨论线性环绕组顺序。为了向后兼容,解析器不应拒绝不遵循右手规则的多边形。
Though a linear ring is not explicitly represented as a GeoJSON geometry type, it leads to a canonical formulation of the Polygon geometry type definition as follows:
虽然线性环没有显式表示为GeoJSON几何体类型,但它会导致多边形几何体类型定义的规范化公式,如下所示:
o For type "Polygon", the "coordinates" member MUST be an array of linear ring coordinate arrays.
o 对于“多边形”类型,“坐标”成员必须是线性环形坐标数组的数组。
o For Polygons with more than one of these rings, the first MUST be the exterior ring, and any others MUST be interior rings. The exterior ring bounds the surface, and the interior rings (if present) bound holes within the surface.
o 对于具有多个环的多边形,第一个环必须是外环,其他环必须是内环。外环约束曲面,内环(如果存在)约束曲面内的孔。
For type "MultiPolygon", the "coordinates" member is an array of Polygon coordinate arrays.
对于“MultiPolygon”类型,“坐标”成员是多边形坐标数组的数组。
A GeoJSON object with type "GeometryCollection" is a Geometry object. A GeometryCollection has a member with the name "geometries". The value of "geometries" is an array. Each element of this array is a GeoJSON Geometry object. It is possible for this array to be empty.
类型为“GeometryCollection”的GeoJSON对象是几何体对象。GeometryCollection有一个名为“几何体”的成员。“几何体”的值是一个数组。此数组的每个元素都是GeoJSON几何体对象。此数组可能为空。
Unlike the other geometry types described above, a GeometryCollection can be a heterogeneous composition of smaller Geometry objects. For example, a Geometry object in the shape of a lowercase roman "i" can be composed of one point and one LineString.
与上述其他几何体类型不同,GeometryCollection可以是较小几何体对象的异构组合。例如,小写罗马字母“i”形状的几何体对象可以由一个点和一个线串组成。
GeometryCollections have a different syntax from single type Geometry objects (Point, LineString, and Polygon) and homogeneously typed multipart Geometry objects (MultiPoint, MultiLineString, and MultiPolygon) but have no different semantics. Although a GeometryCollection object has no "coordinates" member, it does have coordinates: the coordinates of all its parts belong to the collection. The "geometries" member of a GeometryCollection describes the parts of this composition. Implementations SHOULD NOT apply any additional semantics to the "geometries" array.
GeometryCollections的语法不同于单一类型的几何体对象(点、线串和多边形)和同质类型的多部分几何体对象(多点、多线串和多多边形),但没有不同的语义。尽管GeometryCollection对象没有“坐标”成员,但它确实有坐标:其所有部分的坐标都属于集合。GeometryCollection的“几何体”成员描述此组合的各个部分。实现不应该对“几何体”数组应用任何附加语义。
To maximize interoperability, implementations SHOULD avoid nested GeometryCollections. Furthermore, GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead.
为了最大化互操作性,实现应该避免嵌套GeometryCollection。此外,当可以使用单个零件或多零件类型(多点、多线或多多边形)的单个对象时,应避免使用由单个零件或多个单一类型零件组成的Geometry集合。
In representing Features that cross the antimeridian, interoperability is improved by modifying their geometry. Any geometry that crosses the antimeridian SHOULD be represented by cutting it in two such that neither part's representation crosses the antimeridian.
在表示跨反梅里迪亚的特性时,通过修改它们的几何结构可以提高互操作性。任何穿过反多边形的几何体都应该通过将其切成两段来表示,这样两部分的表示都不会穿过反多边形。
For example, a line extending from 45 degrees N, 170 degrees E across the antimeridian to 45 degrees N, 170 degrees W should be cut in two and represented as a MultiLineString.
例如,从北纬45度、东经170度穿过反球面到北纬45度、西经170度的直线应切成两半,并表示为多线。
{ "type": "MultiLineString", "coordinates": [ [ [170.0, 45.0], [180.0, 45.0] ], [ [-180.0, 45.0], [-170.0, 45.0] ] ] }
{ "type": "MultiLineString", "coordinates": [ [ [170.0, 45.0], [180.0, 45.0] ], [ [-180.0, 45.0], [-170.0, 45.0] ] ] }
A rectangle extending from 40 degrees N, 170 degrees E across the antimeridian to 50 degrees N, 170 degrees W should be cut in two and represented as a MultiPolygon.
一个从北纬40度、东经170度横跨反日耳曼到北纬50度、西经170度的矩形应该被切成两半,并表示为多边形。
{ "type": "MultiPolygon", "coordinates": [ [ [ [180.0, 40.0], [180.0, 50.0], [170.0, 50.0], [170.0, 40.0], [180.0, 40.0] ] ], [ [ [-170.0, 40.0], [-170.0, 50.0], [-180.0, 50.0], [-180.0, 40.0], [-170.0, 40.0] ] ] ] }
{ "type": "MultiPolygon", "coordinates": [ [ [ [180.0, 40.0], [180.0, 50.0], [170.0, 50.0], [170.0, 40.0], [180.0, 40.0] ] ], [ [ [-170.0, 40.0], [-170.0, 50.0], [-180.0, 50.0], [-180.0, 40.0], [-170.0, 40.0] ] ] ] }
As in [RFC5870], the number of digits of the values in coordinate positions MUST NOT be interpreted as an indication to the level of uncertainty.
如[RFC5870]中所述,坐标位置值的位数不得解释为不确定度水平的指示。
A Feature object represents a spatially bounded thing. Every Feature object is a GeoJSON object no matter where it occurs in a GeoJSON text.
特征对象表示空间上有边界的对象。每个Feature对象都是GeoJSON对象,无论它出现在GeoJSON文本中的何处。
o A Feature object has a "type" member with the value "Feature".
o 要素对象具有值为“要素”的“类型”成员。
o A Feature object has a member with the name "geometry". The value of the geometry member SHALL be either a Geometry object as defined above or, in the case that the Feature is unlocated, a JSON null value.
o 要素对象具有名为“几何体”的成员。几何体成员的值应为上文定义的几何体对象,或者在特征未定位的情况下,为JSON空值。
o A Feature object has a member with the name "properties". The value of the properties member is an object (any JSON object or a JSON null value).
o 要素对象具有名为“属性”的成员。properties成员的值是一个对象(任何JSON对象或JSON空值)。
o If a Feature has a commonly used identifier, that identifier SHOULD be included as a member of the Feature object with the name "id", and the value of this member is either a JSON string or number.
o 如果功能具有常用标识符,则该标识符应作为名为“id”的功能对象的成员包含,并且该成员的值为JSON字符串或数字。
A GeoJSON object with the type "FeatureCollection" is a FeatureCollection object. A FeatureCollection object has a member with the name "features". The value of "features" is a JSON array. Each element of the array is a Feature object as defined above. It is possible for this array to be empty.
类型为“FeatureCollection”的GeoJSON对象是FeatureCollection对象。FeatureCollection对象具有名为“features”的成员。“features”的值是一个JSON数组。数组的每个元素都是如上定义的要素对象。此数组可能为空。
The coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units of decimal degrees. This is equivalent to the coordinate reference system identified by the Open Geospatial Consortium (OGC) URN urn:ogc:def:crs:OGC::CRS84. An OPTIONAL third-position element SHALL be the height in meters above or below the WGS 84 reference ellipsoid. In the absence of elevation values, applications sensitive to height or depth SHOULD interpret positions as being at local ground or sea level.
所有GeoJSON坐标的坐标参考系是一个地理坐标参考系,使用1984年世界大地测量系统(WGS 84)[WGS84]基准,经纬度单位为十进制度数。这相当于开放地理空间联盟(OGC)URN URN:OGC:def:crs:OGC::CRS84确定的坐标参考系。可选的第三位置元素应为WGS 84参考椭球体上方或下方的高度(以米为单位)。在没有高程值的情况下,对高度或深度敏感的应用程序应将位置解释为位于当地地面或海平面。
Note: the use of alternative coordinate reference systems was specified in [GJ2008], but it has been removed from this version of the specification because the use of different coordinate reference systems -- especially in the manner specified in [GJ2008] -- has proven to have interoperability issues. In general, GeoJSON processing software is not expected to have access to coordinate reference system databases or to have network access to coordinate reference system transformation parameters. However, where all involved parties have a prior arrangement, alternative coordinate reference systems can be used without risk of data being misinterpreted.
注:替代坐标参考系的使用在[GJ1008]中有规定,但由于不同坐标参考系的使用——特别是以[GJ1008]中规定的方式使用——已证明存在互操作性问题,因此已从本规范版本中删除。一般来说,GeoJSON处理软件不需要访问坐标参考系数据库,也不需要通过网络访问坐标参考系转换参数。然而,如果所有相关方都有事先安排,则可以使用替代坐标参考系统,而不存在数据被误解的风险。
A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries.
GeoJSON对象可能有一个名为“bbox”的成员,其中包含有关其几何图形、特征或特征集合的坐标范围的信息。bbox成员的值必须是长度为2*n的数组,其中n是包含的几何图形中表示的尺寸数,最西南点的所有轴后跟更东北点的所有轴。bbox的轴顺序遵循几何图形的轴顺序。
The "bbox" values define shapes with edges that follow lines of constant longitude, latitude, and elevation.
“bbox”值定义具有沿恒定经度、纬度和高程线的边的形状。
Example of a 2D bbox member on a Feature:
要素上的二维bbox成员示例:
{ "type": "Feature", "bbox": [-10.0, -10.0, 10.0, 10.0], "geometry": { "type": "Polygon", "coordinates": [ [ [-10.0, -10.0], [10.0, -10.0], [10.0, 10.0], [-10.0, -10.0] ] ] } //... }
{ "type": "Feature", "bbox": [-10.0, -10.0, 10.0, 10.0], "geometry": { "type": "Polygon", "coordinates": [ [ [-10.0, -10.0], [10.0, -10.0], [10.0, 10.0], [-10.0, -10.0] ] ] } //... }
Example of a 2D bbox member on a FeatureCollection:
FeatureCollection上的2D bbox成员示例:
{ "type": "FeatureCollection", "bbox": [100.0, 0.0, 105.0, 1.0], "features": [ //... ] }
{ "type": "FeatureCollection", "bbox": [100.0, 0.0, 105.0, 1.0], "features": [ //... ] }
Example of a 3D bbox member with a depth of 100 meters:
深度为100米的3D bbox构件示例:
{ "type": "FeatureCollection", "bbox": [100.0, 0.0, -100.0, 105.0, 1.0, 0.0], "features": [ //... ] }
{ "type": "FeatureCollection", "bbox": [100.0, 0.0, -100.0, 105.0, 1.0, 0.0], "features": [ //... ] }
The four lines of the bounding box are defined fully within the coordinate reference system; that is, for a box bounded by the values "west", "south", "east", and "north", every point on the northernmost line can be expressed as
边界框的四条线完全在坐标参照系内定义;也就是说,对于以值“西”、“南”、“东”和“北”为边界的框,最北端线上的每个点都可以表示为
(lon, lat) = (west + (east - west) * t, north)
(lon, lat) = (west + (east - west) * t, north)
with 0 <= t <= 1.
0<=t<=1。
Consider a set of point Features within the Fiji archipelago, straddling the antimeridian between 16 degrees S and 20 degrees S. The southwest corner of the box containing these Features is at 20 degrees S and 177 degrees E, and the northwest corner is at 16 degrees S and 178 degrees W. The antimeridian-spanning GeoJSON bounding box for this FeatureCollection is
考虑斐济群岛内的一组点特征,横跨16度和20度S之间的反子系统。包含这些特征的盒子的西南角在20度和177度E,西北角位于南纬16度和西经178度。此功能集合的反梅里亚跨度GeoJSON边界框为
"bbox": [177.0, -20.0, -178.0, -16.0]
"bbox": [177.0, -20.0, -178.0, -16.0]
and covers 5 degrees of longitude.
覆盖5度经度。
The complementary bounding box for the same latitude band, not crossing the antimeridian, is
相同纬度带的互补边界框(不穿过反球面)为
"bbox": [-178.0, -20.0, 177.0, -16.0]
"bbox": [-178.0, -20.0, 177.0, -16.0]
and covers 355 degrees of longitude.
覆盖了355度的经度。
The latitude of the northeast corner is always greater than the latitude of the southwest corner, but bounding boxes that cross the antimeridian have a northeast corner longitude that is less than the longitude of the southwest corner.
东北角的纬度始终大于西南角的纬度,但穿过反日耳曼边界的边界框的东北角经度小于西南角的经度。
A bounding box that contains the North Pole extends from a southwest corner of "minlat" degrees N, 180 degrees W to a northeast corner of 90 degrees N, 180 degrees E. Viewed on a globe, this bounding box approximates a spherical cap bounded by the "minlat" circle of latitude.
包含北极的边界框从北纬180度的“minlat”西南角延伸到北纬90度、东经180度的东北角。从地球仪上看,该边界框近似于以纬度“minlat”圆为边界的球形帽。
"bbox": [-180.0, minlat, 180.0, 90.0]
"bbox": [-180.0, minlat, 180.0, 90.0]
A bounding box that contains the South Pole extends from a southwest corner of 90 degrees S, 180 degrees W to a northeast corner of "maxlat" degrees S, 180 degrees E.
包含南极的边界框从南纬90度、西经180度的西南角延伸到南纬180度、东经180度的“maxlat”东北角。
"bbox": [-180.0, -90.0, 180.0, maxlat]
"bbox": [-180.0, -90.0, 180.0, maxlat]
A bounding box that just touches the North Pole and forms a slice of an approximate spherical cap when viewed on a globe extends from a southwest corner of "minlat" degrees N and "westlon" degrees E to a northeast corner of 90 degrees N and "eastlon" degrees E.
从地球仪上看,仅接触北极并形成近似球形帽片的边界框从“minlat”N度和“westlon”E度的西南角延伸至90 N度和“eastlon”E度的东北角。
"bbox": [westlon, minlat, eastlon, 90.0]
"bbox": [westlon, minlat, eastlon, 90.0]
Similarly, a bounding box that just touches the South Pole and forms a slice of an approximate spherical cap when viewed on a globe has the following representation in GeoJSON.
类似地,当在地球仪上观看时,仅接触南极并形成近似球形帽片的边界框具有以下GeoJSON表示。
"bbox": [westlon, -90.0, eastlon, maxlat]
"bbox": [westlon, -90.0, eastlon, maxlat]
Implementers MUST NOT use latitude values greater than 90 or less than -90 to imply an extent that is not a spherical cap.
实施者不得使用大于90或小于-90的纬度值来表示范围不是球形范围。
Members not described in this specification ("foreign members") MAY be used in a GeoJSON document. Note that support for foreign members can vary across implementations, and no normative processing model for foreign members is defined. Accordingly, implementations that rely too heavily on the use of foreign members might experience reduced interoperability with other implementations.
本规范中未描述的成员(“外来成员”)可在GeoJSON文档中使用。请注意,对外部成员的支持可能因实现而异,并且没有为外部成员定义标准的处理模型。因此,过于依赖使用外部成员的实现可能会降低与其他实现的互操作性。
For example, in the (abridged) Feature object shown below
例如,在下面显示的(节略)特征对象中
{ "type": "Feature", "id": "f1", "geometry": {...}, "properties": {...}, "title": "Example Feature" }
{ "type": "Feature", "id": "f1", "geometry": {...}, "properties": {...}, "title": "Example Feature" }
the name/value pair of "title": "Example Feature" is a foreign member. When the value of a foreign member is an object, all the descendant members of that object are themselves foreign members.
the name/value pair of "title": "Example Feature" is a foreign member. When the value of a foreign member is an object, all the descendant members of that object are themselves foreign members.
GeoJSON semantics do not apply to foreign members and their descendants, regardless of their names and values. For example, in the (abridged) Feature object below
GeoJSON语义不适用于外部成员及其后代,无论其名称和值如何。例如,在下面的(节略)特征对象中
{ "type": "Feature", "id": "f2", "geometry": {...}, "properties": {...}, "centerline": { "type": "LineString", "coordinates": [ [-170, 10], [170, 11] ] } }
{ "type": "Feature", "id": "f2", "geometry": {...}, "properties": {...}, "centerline": { "type": "LineString", "coordinates": [ [-170, 10], [170, 11] ] } }
the "centerline" member is not a GeoJSON Geometry object.
“中心线”成员不是GeoJSON几何体对象。
Implementations MUST NOT extend the fixed set of GeoJSON types: FeatureCollection, Feature, Point, LineString, MultiPoint, Polygon, MultiLineString, MultiPolygon, and GeometryCollection.
实现不能扩展固定的GeoJSON类型集:FeatureCollection、Feature、Point、LineString、MultiPoint、Polygon、MultileString、MultiPolygon和GeometryCollection。
Implementations MUST NOT change the semantics of GeoJSON members and types.
实现不能更改GeoJSON成员和类型的语义。
The GeoJSON "coordinates" and "geometries" members define Geometry objects. FeatureCollection and Feature objects, respectively, MUST NOT contain a "coordinates" or "geometries" member.
GeoJSON“坐标”和“几何体”成员定义几何体对象。FeatureCollection和Feature对象分别不得包含“坐标”或“几何体”成员。
The GeoJSON "geometry" and "properties" members define a Feature object. FeatureCollection and Geometry objects, respectively, MUST NOT contain a "geometry" or "properties" member.
GeoJSON“几何体”和“属性”成员定义要素对象。FeatureCollection和Geometry对象分别不得包含“Geometry”或“properties”成员。
The GeoJSON "features" member defines a FeatureCollection object. Feature and Geometry objects, respectively, MUST NOT contain a "features" member.
GeoJSON“features”成员定义FeatureCollection对象。要素和几何图形对象分别不得包含“要素”成员。
The GeoJSON format can be extended as defined here, but no explicit versioning scheme is defined. A specification that alters the semantics of GeoJSON members or otherwise modifies the format does not create a new version of this format; instead, it defines an entirely new format that MUST NOT be identified as GeoJSON.
GeoJSON格式可以按照这里的定义进行扩展,但没有定义明确的版本控制方案。改变GeoJSON成员语义或以其他方式修改格式的规范不会创建此格式的新版本;相反,它定义了一种全新的格式,不能标识为GeoJSON。
'geo' URIs [RFC5870] identify geographic locations and precise (not uncertain) locations can be mapped to GeoJSON Geometry objects.
“geo”URI[RFC5870]标识地理位置,精确(不确定)位置可以映射到GeoJSON几何体对象。
For this section, as in [RFC5870], "lat", "lon", "alt", and "unc" are placeholders for 'geo' URI latitude, longitude, altitude, and uncertainty values, respectively.
对于本节,与[RFC5870]中一样,“lat”、“lon”、“alt”和“unc”分别是“geo”URI纬度、经度、海拔和不确定度值的占位符。
A 'geo' URI with two coordinates and an uncertainty ('u') parameter that is absent or zero, and a GeoJSON Point geometry may be mapped to each other. A GeoJSON Point is always converted to a 'geo' URI that has no uncertainty parameter.
具有两个坐标和不确定性('u')参数(不存在或为零)的“geo”URI,以及GeoJSON点几何体可以相互映射。GeoJSON点始终转换为没有不确定性参数的“geo”URI。
'geo' URI:
“geo”URI:
geo:lat,lon
地理:拉特,朗
GeoJSON:
GeoJSON:
{"type": "Point", "coordinates": [lon, lat]}
{"type": "Point", "coordinates": [lon, lat]}
The mapping between 'geo' URIs and GeoJSON Points that specify elevation is shown below.
“geo”URI和指定高程的GeoJSON点之间的映射如下所示。
'geo' URI:
“geo”URI:
geo:lat,lon,alt
地理位置:纬度、经度、高度
GeoJSON:
GeoJSON:
{"type": "Point", "coordinates": [lon, lat, alt]}
{"type": "Point", "coordinates": [lon, lat, alt]}
GeoJSON has no concept of uncertainty; imprecise or uncertain 'geo' URIs thus cannot be mapped to GeoJSON geometries.
GeoJSON没有不确定性的概念;因此,不精确或不确定的“geo”URI无法映射到GeoJSON几何体。
GeoJSON shares security issues common to all JSON content types. See [RFC7159], Section 12 for additional information. GeoJSON does not provide executable content.
GeoJSON共享所有JSON内容类型共有的安全问题。更多信息,请参见[RFC7159],第12节。GeoJSON不提供可执行内容。
GeoJSON does not provide privacy or integrity services. If sensitive data requires privacy or integrity protection, those must be provided by the transport -- for example, Transport Layer Security (TLS) or HTTPS. There will be cases in which stored data need protection, which is out of scope for this document.
GeoJSON不提供隐私或完整性服务。如果敏感数据需要隐私或完整性保护,则必须由传输提供——例如,传输层安全(TLS)或HTTPS。在某些情况下,存储的数据需要保护,这超出了本文档的范围。
As with other geographic data formats, e.g., [KMLv2.2], providing details about the locations of sensitive persons, animals, habitats, and facilities can expose them to unauthorized tracking or injury. Data providers should recognize the risk of inadvertently identifying individuals if locations in anonymized datasets are not adequately skewed or not sufficiently fuzzed [Sweeney] and recognize that the effectiveness of location obscuration is limited by a number of factors and is unlikely to be an effective defense against a determined attack [RFC6772].
与其他地理数据格式(如[KMLv2.2])一样,提供敏感人员、动物、栖息地和设施位置的详细信息可能会使他们受到未经授权的跟踪或伤害。如果匿名数据集中的位置未充分倾斜或模糊,数据提供商应认识到无意中识别个人的风险[Sweeney],并认识到位置模糊的有效性受到许多因素的限制,不太可能有效防御确定的攻击[RFC6772]。
GeoJSON texts should follow the constraints of Internet JSON (I-JSON) [RFC7493] for maximum interoperability.
GeoJSON文本应遵循Internet JSON(I-JSON)[RFC7493]的约束,以实现最大的互操作性。
The size of a GeoJSON text in bytes is a major interoperability consideration, and precision of coordinate values has a large impact on the size of texts. A GeoJSON text containing many detailed Polygons can be inflated almost by a factor of two by increasing coordinate precision from 6 to 15 decimal places. For geographic coordinates with units of degrees, 6 decimal places (a default common in, e.g., sprintf) amounts to about 10 centimeters, a precision well within that of current GPS systems. Implementations should consider the cost of using a greater precision than necessary.
GeoJSON文本的大小(以字节为单位)是互操作性的主要考虑因素,坐标值的精度对文本的大小有很大影响。通过将坐标精度从小数点后6位提高到15位,包含许多详细多边形的GeoJSON文本几乎可以膨胀两倍。对于以度为单位的地理坐标,小数点后6位(例如sprintf中常见的默认值)约为10厘米,这一精度与当前GPS系统相当。实现应该考虑使用比需要的精度更高的成本。
Furthermore, the WGS 84 [WGS84] datum is a relatively coarse approximation of the geoid, with the height varying by up to 5 m (but generally between 2 and 3 meters) higher or lower relative to a surface parallel to Earth's mean sea level.
此外,WGS 84[WGS84]基准面是大地水准面相对粗略的近似值,相对于平行于地球平均海平面的表面,其高度可高或低5米(但通常在2到3米之间)。
The media type for GeoJSON text is "application/geo+json" and is registered in the "Media Types" registry described in [RFC6838]. The entry for "application/vnd.geo+json" in the same registry should have its status changed to be "OBSOLETED" with a pointer to the media type "application/geo+json" and a reference added to this RFC.
GeoJSON文本的媒体类型为“application/geo+json”,并在[RFC6838]中描述的“媒体类型”注册表中注册。同一注册表中的“application/vnd.geo+json”条目的状态应更改为“已过时”,并带有指向媒体类型“application/geo+json”的指针和添加到此RFC的引用。
Type name: application
类型名称:应用程序
Subtype name: geo+json
子类型名称:geo+json
Required parameters: n/a
所需参数:不适用
Optional parameters: n/a
可选参数:不适用
Encoding considerations: binary
编码注意事项:二进制
Security considerations: See Section 10 above
安全考虑:见上文第10节
Interoperability considerations: See Section 11 above
互操作性注意事项:见上文第11节
Published specification: [[RFC7946]]
已发布规范:[[RFC7946]]
Applications that use this media type: No known applications currently use this media type. This media type is intended for GeoJSON applications currently using the "application/ vnd.geo+json" or "application/json" media types, of which there are several categories: web mapping, geospatial databases, geographic data processing APIs, data analysis and storage services, and data dissemination.
使用此媒体类型的应用程序:目前没有已知的应用程序使用此媒体类型。此媒体类型适用于当前使用“application/vnd.geo+json”或“application/json”媒体类型的GeoJSON应用程序,其中有几个类别:web映射、地理空间数据库、地理数据处理API、数据分析和存储服务以及数据发布。
Additional information:
其他信息:
Magic number(s): n/a
Magic number(s): n/a
File extension(s): .json, .geojson
文件扩展名:.json、.geojson
Macintosh file type code: n/a
Macintosh文件类型代码:不适用
Object Identifiers: n/a
对象标识符:不适用
Windows clipboard name: GeoJSON
Windows剪贴板名称:GeoJSON
Macintosh uniform type identifier: public.geojson conforms to public.json
Macintosh统一类型标识符:public.geojson符合public.json
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
使用限制:无
Restrictions on usage: none
使用限制:无
Author: see "Authors' Addresses" section of [[RFC7946]].
作者:参见[[RFC7946]]的“作者地址”部分。
Change controller: Internet Engineering Task Force
变更控制员:互联网工程特别工作组
[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>.
[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10.17487/RFC6838, January 2013, <http://www.rfc-editor.org/info/rfc6838>.
[RFC6838]Freed,N.,Klensin,J.和T.Hansen,“介质类型规范和注册程序”,BCP 13,RFC 6838,DOI 10.17487/RFC6838,2013年1月<http://www.rfc-editor.org/info/rfc6838>.
[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>.
[RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493, DOI 10.17487/RFC7493, March 2015, <http://www.rfc-editor.org/info/rfc7493>.
[RFC7493]Bray,T.,Ed.,“I-JSON消息格式”,RFC 7493,DOI 10.17487/RFC7493,2015年3月<http://www.rfc-editor.org/info/rfc7493>.
[WGS84] National Imagery and Mapping Agency, "Department of Defense World Geodetic System 1984: Its Definition and Relationships with Local Geodetic Systems", Third Edition, 1984.
[WGS84]国家图像和测绘局,“1984年国防部世界大地测量系统:其定义及其与地方大地测量系统的关系”,第三版,1984年。
[GJ2008] Butler, H., Daly, M., Doyle, A., Gillies, S., Schaub, T., and C. Schmidt, "The GeoJSON Format Specification", June 2008.
[GJ1008]Butler,H.,Daly,M.,Doyle,A.,Gillies,S.,Schaub,T.,和C.Schmidt,“GeoJSON格式规范”,2008年6月。
[KMLv2.2] Wilson, T., "OGC KML", OGC 07-147r2, Version 2.2.0, April 2008.
[KMLv2.2]Wilson,T.,“OGC KML”,OGC 07-147r2,版本2.2.0,2008年4月。
[RFC5870] Mayrhofer, A. and C. Spanring, "A Uniform Resource Identifier for Geographic Locations ('geo' URI)", RFC 5870, DOI 10.17487/RFC5870, June 2010, <http://www.rfc-editor.org/info/rfc5870>.
[RFC5870]Mayrhofer,A.和C.Sparing,“地理位置的统一资源标识符(‘地理’URI)”,RFC 5870,DOI 10.17487/RFC5870,2010年6月<http://www.rfc-editor.org/info/rfc5870>.
[RFC6772] Schulzrinne, H., Ed., Tschofenig, H., Ed., Cuellar, J., Polk, J., Morris, J., and M. Thomson, "Geolocation Policy: A Document Format for Expressing Privacy Preferences for Location Information", RFC 6772, DOI 10.17487/RFC6772, January 2013, <http://www.rfc-editor.org/info/rfc6772>.
[RFC6772]Schulzrinne,H.,Ed.,Tschofenig,H.,Ed.,Cuellar,J.,Polk,J.,Morris,J.,和M.Thomson,“地理位置政策:表达位置信息隐私偏好的文档格式”,RFC 6772,DOI 10.17487/RFC6772,2013年1月<http://www.rfc-editor.org/info/rfc6772>.
[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>.
[SFSQL] OpenGIS Consortium, Inc., "OpenGIS Simple Features Specification For SQL Revision 1.1", OGC 99-049, May 1999.
[SFSQL]OpenGIS Consortium,Inc.,“SQL版本1.1的OpenGIS简单功能规范”,OGC 99-049,1999年5月。
[Sweeney] Sweeney, L., "k-anonymity: a model for protecting privacy", International Journal on Uncertainty, Fuzziness and Knowledge-based Systems 10 (5), 2002; 557-570, DOI 10.1142/S0218488502001648, 2002.
[Sweeney]Sweeney,L.,“k-匿名性:保护隐私的模型”,《不确定性、模糊性和基于知识的系统国际期刊》10(5),2002年;557-570,内政部10.1142/S0218488502001642002。
[WFSv1] Vretanos, P., "Web Feature Service Implementation Specification", OGC 04-094, Version 1.1.0, May 2005.
[WFSv1]Vretanos,P.,“Web功能服务实现规范”,OGC 04-094,版本1.1.0,2005年5月。
Each of the examples below represents a valid and complete GeoJSON object.
下面的每个示例都表示一个有效且完整的GeoJSON对象。
Point coordinates are in x, y order (easting, northing for projected coordinates, longitude, and latitude for geographic coordinates):
点坐标按x、y顺序排列(投影坐标为东、北,地理坐标为经度和纬度):
{ "type": "Point", "coordinates": [100.0, 0.0] }
{ "type": "Point", "coordinates": [100.0, 0.0] }
Coordinates of LineString are an array of positions (see Section 3.1.1):
线串的坐标是一组位置(见第3.1.1节):
{ "type": "LineString", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] }
{ "type": "LineString", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] }
Coordinates of a Polygon are an array of linear ring (see Section 3.1.6) coordinate arrays. The first element in the array represents the exterior ring. Any subsequent elements represent interior rings (or holes).
多边形的坐标是一组线性环(见第3.1.6节)坐标阵列。数组中的第一个元素表示外环。任何后续元素表示内环(或孔)。
No holes:
无孔:
{ "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] }
{ "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] }
With holes:
带孔:
{ "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], [ [100.8, 0.8], [100.8, 0.2], [100.2, 0.2], [100.2, 0.8], [100.8, 0.8] ] ] }
{ "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], [ [100.8, 0.8], [100.8, 0.2], [100.2, 0.2], [100.2, 0.8], [100.8, 0.8] ] ] }
Coordinates of a MultiPoint are an array of positions:
多点坐标是一组位置:
{ "type": "MultiPoint", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] }
{ "type": "MultiPoint", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] }
Coordinates of a MultiLineString are an array of LineString coordinate arrays:
多重线串的坐标是线串坐标数组的数组:
{ "type": "MultiLineString", "coordinates": [ [ [100.0, 0.0], [101.0, 1.0] ], [ [102.0, 2.0], [103.0, 3.0] ] ] }
{ "type": "MultiLineString", "coordinates": [ [ [100.0, 0.0], [101.0, 1.0] ], [ [102.0, 2.0], [103.0, 3.0] ] ] }
Coordinates of a MultiPolygon are an array of Polygon coordinate arrays:
多边形的坐标是多边形坐标数组的数组:
{ "type": "MultiPolygon", "coordinates": [ [ [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] ], [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], [ [100.2, 0.2], [100.2, 0.8], [100.8, 0.8], [100.8, 0.2], [100.2, 0.2] ] ] ] }
{ "type": "MultiPolygon", "coordinates": [ [ [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] ], [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], [ [100.2, 0.2], [100.2, 0.8], [100.8, 0.8], [100.8, 0.2], [100.2, 0.2] ] ] ] }
Each element in the "geometries" array of a GeometryCollection is one of the Geometry objects described above:
GeometryCollection的“几何体”数组中的每个元素都是上述几何体对象之一:
{ "type": "GeometryCollection", "geometries": [{ "type": "Point", "coordinates": [100.0, 0.0] }, { "type": "LineString", "coordinates": [ [101.0, 0.0], [102.0, 1.0] ] }] }
{ "type": "GeometryCollection", "geometries": [{ "type": "Point", "coordinates": [100.0, 0.0] }, { "type": "LineString", "coordinates": [ [101.0, 0.0], [102.0, 1.0] ] }] }
This appendix briefly summarizes non-editorial changes from the 2008 specification [GJ2008].
本附录简要总结了2008年规范[GJ1008]的非编辑性变更。
o Specification of coordinate reference systems has been removed, i.e., the "crs" member of [GJ2008] is no longer used.
o 已删除坐标参考系规范,即不再使用[GJ1008]中的“crs”成员。
o In the absence of elevation values, applications sensitive to height or depth SHOULD interpret positions as being at local ground or sea level (see Section 4).
o 在没有高程值的情况下,对高度或深度敏感的应用应将位置解释为位于当地地面或海平面(见第4节)。
o Implementations SHOULD NOT extend position arrays beyond 3 elements (see Section 3.1.1).
o 实现不应将位置数组扩展到3个元素之外(参见第3.1.1节)。
o A line between two positions is a straight Cartesian line (see Section 3.1.1).
o 两个位置之间的直线为笛卡尔直线(见第3.1.1节)。
o Polygon rings MUST follow the right-hand rule for orientation (counterclockwise external rings, clockwise internal rings).
o 多边形环必须遵循右手方向规则(逆时针外环、顺时针内环)。
o The values of a "bbox" array are "[west, south, east, north]", not "[minx, miny, maxx, maxy]" (see Section 5).
o “bbox”数组的值是“[西、南、东、北]”,而不是“[最小、最小、最大、最大]”(参见第5节)。
o A Feature object's "id" member is a string or number (see Section 3.2).
o 要素对象的“id”成员是字符串或数字(参见第3.2节)。
o Extensions MAY be used, but MUST NOT change the semantics of GeoJSON members and types (see Section 6).
o 可以使用扩展,但不能更改GeoJSON成员和类型的语义(参见第6节)。
o GeoJSON objects MUST NOT contain the defining members of other types (see Section 7.1).
o GeoJSON对象不得包含其他类型的定义成员(参见第7.1节)。
o The media type for GeoJSON is "application/geo+json".
o GeoJSON的媒体类型为“application/geo+json”。
o The definition of a GeoJSON text has been added.
o 添加了GeoJSON文本的定义。
o Rules for mapping 'geo' URIs have been added.
o 添加了映射“地理”URI的规则。
o A recommendation of the I-JSON [RFC7493] constraints has been added.
o 增加了I-JSON[RFC7493]约束的建议。
o Implementers are cautioned about the effect of excessive coordinate precision on interoperability.
o 实施者应注意过多的坐标精度对互操作性的影响。
o Interoperability concerns of GeometryCollections are noted. These objects should be used sparingly (see Section 3.1.8).
o 注意Geometry集合的互操作性问题。应谨慎使用这些物体(见第3.1.8节)。
All GeoJSON objects defined in this specification -- FeatureCollection, Feature, and Geometry -- consist of exactly one JSON object. However, there may be circumstances in which applications need to represent sets or sequences of these objects (over and above the grouping of Feature objects in a FeatureCollection), e.g., in order to efficiently "stream" large numbers of Feature objects. The definition of such sets or sequences is outside the scope of this specification.
本规范中定义的所有GeoJSON对象——FeatureCollection、Feature和Geometry——只包含一个JSON对象。然而,在某些情况下,应用程序可能需要表示这些对象的集合或序列(在FeatureCollection中的要素对象分组之上),例如,为了有效地“流化”大量要素对象。此类集合或序列的定义不在本规范的范围内。
If such a representation is needed, a new media type is required that has the ability to represent these sets or sequences. When defining such a media type, it may be useful to base it on "JavaScript Object Notation (JSON) Text Sequences" [RFC7464], leaving the foundations of how to represent multiple JSON objects to that specification, and only defining how it applies to GeoJSON objects.
如果需要这种表示,则需要能够表示这些集合或序列的新媒体类型。在定义此类媒体类型时,基于“JavaScript对象表示法(JSON)文本序列”[RFC7464]可能很有用,将如何表示多个JSON对象的基础留给该规范,并且只定义如何将其应用于GeoJSON对象。
Acknowledgements
致谢
The GeoJSON format is the product of discussion on the GeoJSON mailing list, <http://lists.geojson.org/listinfo.cgi/ geojson-geojson.org>, before October 2015 and in the IETF's GeoJSON WG after October 2015.
GeoJSON格式是GeoJSON邮件列表讨论的结果<http://lists.geojson.org/listinfo.cgi/ geojson geojson.org>,在2015年10月之前和2015年10月之后在IETF的geojson工作组中。
Material in this document was adapted with changes from <http://geojson.org/geojson-spec.html> [GJ2008], which is licensed under <http://creativecommons.org/licenses/by/3.0/us/>.
本文件中的材料根据以下内容进行了修改:<http://geojson.org/geojson-spec.html>[GJ1008],根据<http://creativecommons.org/licenses/by/3.0/us/>.
Authors' Addresses
作者地址
Howard Butler Hobu Inc.
霍华德·巴特勒·霍布公司。
Email: howard@hobu.co
Email: howard@hobu.co
Martin Daly Cadcorp
马丁·戴利·卡德公司
Email: martin.daly@cadcorp.com
Email: martin.daly@cadcorp.com
Allan Doyle
艾伦·道尔
Email: adoyle@intl-interfaces.com
Email: adoyle@intl-interfaces.com
Sean Gillies Mapbox
肖恩·吉利斯地图盒
Email: sean.gillies@gmail.com URI: http://sgillies.net
Email: sean.gillies@gmail.com URI: http://sgillies.net
Stefan Hagen Rheinaustr. 62 Bonn 53225 Germany
斯特凡·哈根·莱因施特。62波恩53225德国
Email: stefan@hagen.link URI: http://stefan-hagen.website/
Email: stefan@hagen.link URI: http://stefan-hagen.website/
Tim Schaub Planet Labs
Tim Schaub行星实验室
Email: tim.schaub@gmail.com
Email: tim.schaub@gmail.com