地质杰森(Geographic JavaScript Object Notation) Reader/Writer

Licensing optionsfor this format begin with FME Professional Edition.

地质杰森is a standard for encoding spatial data in JSON structured text. FME currently supports the GeoJSON Format Specification Revision 1.0, which is available athttp://geojson.org..

概述

Geojson将几何和功能信息进行编码为对象。它还提供了对几何和功能集合的支持。

Geojson表示具有单个JSON对象的几何图形。

几何类型由值的值识别typekey, which must be present in a GeoJSON object. Possible values of thetypekey are观点,Linestring.,多边形,MultiPoint,MultiLineString, 和MultiPolygon. The geometry coordinates are stored in thecoordinates几何对象的键。

聚合几何形状由具有一个geojson对象表示的typekey with value几何校会.

A几何校会对象必须包含一个几何形状key whose value is an array containing GeoJSON geometry objects.

A feature is represented by a GeoJSON object which has atypekey with valueFeature.

AFeature对象可能包含一个geometry键,其值是地理杂志几何对象或地理杂志几何校会object. AFeature对象也可能包含一个特性键,其值是包含属性名称和值的对象。

一个特征集合由Geojson对象表示,该对象具有一个typekey with valueFeatureCollection..

AFeatureCollection.必须包含一个特征key whose value is any array containing GeoJSONFeature对象。

Coordinate systems are supported in GeoJSON through the use of aCRS.钥匙。

如果Geojson对象有CRS.key, it is assumed to represent the coordinate reference system of the included features or geometries. The value of theCRS.键必须是包含a的对象typeA.特性钥匙。如果是CRS.key is absent, the projection is assumed to be LL84. If thetypekey is set to'名称', then the feature(s) will be tagged with an OGC CRS URN. If thetypekey is set to‘link’, it means that thehref键被指定为包含CRS Info的URL或文件路径。在这种情况下,href参数将存储在JSON_CRS_URL属性中,其相应的typein the json_crs_url_type attribute.

读者概述

The GeoJSON reader is capable of reading several different GeoJSON structures. If the base JSON element is a GeoJSON geometry object, then the reader will return a single FME feature with the given geometry. If the base JSON element is a GeoJSON几何校会对象,然后读取器返回具有聚合几何的单个FME功能。在这两种情况下,FME功能类型将是地质杰森.

如果基础JSON元素是地理杂志Featureobject, then the GeoJSON reader will return a single FME feature. The feature geometry will be taken from thegeometrykey of theFeature对象,并且将从中获取特征属性特性key of theFeatureobject. If the base JSON element is a GeoJSONFeatureCollection.object, then the GeoJSON reader will return an FME feature for each element of the特征array of theFeatureCollection.object. In both cases, the FME feature type for each feature will be地质杰森.

如果是base JSON element is an array, then any GeoJSON objects in the array are converted into FME features as described above.

如果是base JSON element is an object, but not a GeoJSON object, then any value which is a GeoJSON object is converted into FME features as described above, with the exception that the FME feature type is the key name of the corresponding GeoJSON object.

Writer Overview

The GeoJSON writer writes out a single object, in which each key is an FME feature type, and the value of each key is a GeoJSONFeatureCollection.object which contains the features of the given type.