地质杰森(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几何对象的键。 ![]() { “type”:”LineString”, “coordinates”:[ [100.0, 0.0], [101.0, 1.0] ] } |
聚合几何形状由具有一个geojson对象表示的typekey with value几何校会. A几何校会对象必须包含一个几何形状key whose value is an array containing GeoJSON geometry objects. ![]() {“type”:“geometrycollection”,“几何”:[【类型“:”linestring“,”coordinates“:[[100.0,0.0],[101.0,1.0]]},{”类型“:”多点“,“坐标”:[[100.0,0.0],[101.0,1.0]]}]}} |
A feature is represented by a GeoJSON object which has atypekey with valueFeature. AFeature对象可能包含一个geometry键,其值是地理杂志几何对象或地理杂志几何校会object. AFeature对象也可能包含一个特性键,其值是包含属性名称和值的对象。 ![]() { “type”:”Feature”, “geometry”:{ “type”:”MultiPoint”, “coordinates”: [ [102.0, 2.0], [103.0, 3.0] ] } } |
一个特征集合由Geojson对象表示,该对象具有一个typekey with valueFeatureCollection.. AFeatureCollection.必须包含一个特征key whose value is any array containing GeoJSONFeature对象。 ![]() { “type”:”FeatureCollection”, “features”: [ { “type”:”Feature”, “geometry”:{ “type”:”MultiPoint”, “coordinates”: [ [102.0, 2.0], [103.0, 3.0] ] } }, { “type”:”Feature”, “geometry”:{ “type”:”GeometryCollection”, “geometries”: [ { “type”:”LineString”, “coordinates”:[ [100.0, 0.0], [101.0, 1.0] ] }, { “type”:”MultiPoint”, “coordinates”: [ [100.0, 0.0], [101.0, 1.0] ] } ] } } ] } |
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.
![关闭](http://www.baooytra.com/docs/fme/2017.1/html/FME_Desktop_Documentation/FME_ReadersWriters/Skins/Default/Stylesheets/Images/transparent.gif)
GeoJSON读者目前支持协调ystems in EPSG, OGC URN, or URL format as described in the overview.
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.
![关闭](http://www.baooytra.com/docs/fme/2017.1/html/FME_Desktop_Documentation/FME_ReadersWriters/Skins/Default/Stylesheets/Images/transparent.gif)
The GeoJSON writer currently supports coordinate systems in EPSG, OGC URN, or URL format as described in the overview. To write a URL coordinate system, ensure that the json_crs_url and json_crs_url_type attributes are complete and that no coordinate system is set on the feature. If a coordinate system is specified which violates the GeoJSON specifications, the coordinate system will be reprojected to LL84. If no coordinate system is available, no coordinate system will be output. However, it is important to note that the specifications state that GeoJSON objects not specifically tagged with a coordinate reference system are assumed to be the LL84. If multiple coordinate systems exist among features, the first feature will be used to determine the coordinate system for the feature collection.
![关闭](http://www.baooytra.com/docs/fme/2017.1/html/FME_Desktop_Documentation/FME_ReadersWriters/Skins/Default/Stylesheets/Images/transparent.gif)
FME功能几何在地理杂志几何对象中被写入作为值的值geometrykey in aFeature键入geojson对象。由于Geojson仅支持线性几何形状,所以将刻划到线路的弧线,并且省略零件将被击到多边形。此外,路径被简化为单行,并且具有文本几何形状的FME功能仅写入其位置;忽略文本值。
价值geometrykey for an FME feature with aggregate geometry will be a几何校会对象,谁几何形状键将有一系列Geojson几何对象作为其值。