ESRI形状文件读写器
The Esri®Shapefile Reader and Writer module allows FME to read and write Esri's shapefile format.
The shapefile format is a geospatial vector data format for geographic information system (GIS) software.It is developed and regulated by Esri as a (mostly) open specification for data interoperability among Esri and other GIS software 亚搏在线娱乐平台products.
In this example,geographic features (campsite,露营地,森林,道路)在形状文件中用点表示,线,and polygons (areas).Each item usually has attributes that describe it,比如名字,温度,或xy坐标。
概述
ESRI shapefiles store both geometry and attributes for features.不存储拓扑信息。
shapefile是一个逻辑结构,由一系列具有不同扩展名的物理文件组成。这些扩展名将添加到形状文件的基名称中。所有文件必须位于同一文件夹中。
Shapefile does not support small integer (16bit) or integer (32bit) data types.相反,it supports a数(x,y)data type.The equivalent data types are:
- smallint (16bit): number(6,0)
- 整数(32位):数字(11,0)
文件扩展名 | 内容 |
---|---|
.shp |
形状格式–特征几何图形本身。This is a variable-record-length file in which each record describes a shape (feature) with a list of its vertices.一个.shp文件只能包含一种类型的几何图形。支持的几何图形是点,多点,多线polygon,and multipatch. .shp文件中的每个实体在.shx索引文件中都有一个对应的条目,在关联的.dbf文件中有一行对应的属性。这些文件中每个条目的顺序都是同步的。例如,.shp文件中的第三个几何实体由.shx索引文件中的第三个条目指向,其属性保存在.dbf文件的第三行中。 |
.shx |
存储要素几何图形索引的索引文件。In the .shx file,each record contains the offset of the corresponding main file record from the beginning of the main file. |
DBF |
dbase文件(.dbf)包含功能属性,with one record per feature – that is,a one-to-one relationship between a record in the main file and its attributes in the dBASE file – based on record number.例如,如果主文件中的几何图形类型为多点,.dbf文件对于主文件中保存的每一组点将有一行。If the type of geometry in the main file is point,.dbf文件中每个点都有一行。 数据库文件中的属性记录的顺序必须与主文件中的记录的顺序相同。 Any single DBFs (attribute) file can have a maximum file size of 2 GB,DBase III规范规定的限制。Files larger than 2 GB may be readable,but not officially supported.大于2 GB的文件不可写,并将生成一条错误消息。 |
SBN和SBX |
几何数据的空间索引。 These two files will not be written unlessWrite Spatial Index在“形状文件编写器参数”对话框中选择。 |
ATX |
几何数据的属性索引。These files are named asfilename.attributename.atx. 为标记为索引的任何用户属性创建属性索引。更多信息,看见esri shapefile writer:用户属性. |
深圳 | Zipped file that contains all the files that comprise a Shapefile dataset. 例如,沿海地区将包含海岸线,海岸线,海岸线,以及其他形状文件(如果适用)。 |
Shapefile datasets larger than 2 GB are considered invalid (and were probably not created with Esri software),由于以下原因:
- Internal pointers between the index file (.shx) and main file (.shp) are stored as signed 32-bit integers.这是操作系统体系结构的限制。
- Attribute files (.dbf) files also have a 2 GB size limit.
- The main file (.shp) header contains information on the size of the file,指定为有符号整数。写入大于2 GB的shapefile数据集将使文件头无效。
因为索引是用“字”来度量的,FME can read and write 4 GB files.However,这些文件可能无法与其他应用程序一起正常工作。此外,on some 32-bit operating systems,there is no way to reference a location in a file more than 2 GB from the beginning.
形状文件可以同时保存二维和三维几何图形,以及每个顶点上的可选度量值。However,all features within a single shapefile will have the same dimensionality.Note that while older Esri 亚搏在线娱乐平台products may only support two-dimensional shapefiles,FME可以读取和写入二维和三维形状文件。FME can also handle measure data associated with features.
注:Aggregate linear features and aggregate polygonal features may be created using the聚合器变压器。They may be broken into their component pieces for output to formats that do not support aggregation using the解聚合变压器。
注:如果将包含孔的多边形写入形状文件,any adjacent holes will be merged into a single hole before the polygon is output.
如果FME功能包含一个“未命名”度量值,并且目标功能类型设置为2d+度量值或3d+度量值,then FME will write the measure.
在FME数据检查员中,these measures are labeled
shapefile reader将自动加载
注:Measures are currently not supported when reading or writing theshape_multipatch几何类型。
Reader Overview
shapefile reader为存储在指定文件夹中的shapefile中的所有功能数据生成FME功能。
- 指定读卡器格式(esri shapefile)和数据集(.shp文件)
- Optional: SpecifyEsri Shapefile Reader Parameters.
- Click OK.
shapefile reader首先扫描文件夹中已在工作区中定义的shapefiles。对于找到的每个形状文件,它通过查看工作区中指定的功能类型列表来检查是否请求了该文件。如果匹配或工作区中未指定功能类型,the Shapefile is opened to be read.
shapefile reader从文件中一次提取一个特性,并将它们传递给FME的其余部分进行进一步处理。当文件用完时,shapefile读取器从文件夹中的下一个文件开始。
作者概览
shapefile writer创建功能数据并将其写入在writer数据集字段中指定的文件夹中的shapefiles。
- Specify Writer Format (Esri Shapefile) and Dataset (folder name)
- Optional: Specifyesri shapefile writer参数.
- Click OK.
Any old shapefiles in the folder are overwritten with the new feature data.当功能通过FME路由到shapefile writer时,it determines the file they are to be written to and outputs them according to the type of the file.
Many shapefiles can be written during a single FME session.
FME Knowledge Center
标签形状esrishape形状文件