span8
span4
Downloads
Feel free to download and unzip the data (zones.zip file) attached to this article if you'd like to perform these steps yourself as we go along!
vancouverneighborhods.kml google earth文件包含代表社区的区域特征,along with accompanying attribute information including population data.
Introduction
In this tutorial we will translate Google Earth KML (*.kml) data,representing neighborhood areas,to ESRI shape file (*.shp) format.Our goal will be to create an ESRI shapefile of neighbourhoods,and to calculate the percent increase in population between 2001 and 2011.
Step-by-Step Instructions
To complete the process described in the video,您需要执行以下步骤。
1)检查KML数据
Let's take a look at the VancouverNeighborhoods.kml file in Google Earth.We have area features representing the neighborhoods,and each neighborhood has a name along with population data.
使用Google Earth的Places窗口,记下文件夹的名称,and the neighborhoods that contain the spatial and attribute details.We will make use of this information during the transformation process in FME workspace.
2) Start FME Workbench
In Windows this is found under Start > All Programs > FME Desktop > FME Workbench
3) Select Generate Workspace
This is found on the Create Workspace section of the FME Workbench interface.Alternatively,use Ctrl+G as a shortcut.
4) Browse to and select the source (Reader) dataset
Select Google KML for the source format;do this by typing the name into the field until it appears within the dropdown list.导航到vancouverneighborhods.kml文件并选择它。
5)将输出(编写器)格式设置为ESRI形状文件
Select ESRI Shape File for the format for the writer;do this by typing the name into the field until it appears within the dropdown list.
6)设置输出位置
在视频中,设置为C:\fmedata2015\output。然而,您可以将输出位置设置为最适合您的目录结构的位置。
7) Select Feature Types
When we click OK on the Generate Workspace dialog,系统将提示我们选择要素类型对话框。FME Workbench has scanned the KML file and presents the KML elements as feature types.For our purposes we only require the Neighborhoods element,因此,我们将只选择该功能类型。
8) Modify the output (Writer) Feature Type
创建工作区时,FME automatically places a GeometryFilter transformer on the canvas.This occurs because we are translating data from a format that can handle multiple geometries per file (Google KML) to a format that only allows one geometry per file (ESRI shapefile);因此,通过使用几何滤波器变压器,FME自动为我们分离几何图形。
请注意,源数据集中的属性长度超过10个字符。您将看到目标数据集(esri shapefile)已将属性名截断为10个字符。Let's rename these so that they make a bit more sense.
9)增加ExpressionEvaluator变压器
下一步是计算2001年至2011年人口增长率。要做到这一点,我们取差额的绝对值,除以原始值,然后将得到的小数转换为百分比。让我们把这个公式放到一个表达式评估器中。
((@value(pop2011)-@value(pop2001))/@value(pop2001))*100
10)向目标架构添加新属性
Let's add our "PopChange" attribute to our destination shapefile schema.
Its arrow is automatically green because we've named it exactly as we did in the ExpressionEvaluator transformer.
11)单击工具栏上的“运行”按钮。
Run the workspace by clicking on the green play button.This carries out the translation.
12) View the shape file in FME Data Inspector
Once complete,we can use FME Data Inspector to view the Shape file and see that the PopChange data has been calculated for all Vancouver neighborhoods.
How to convert Shapefile to KML
Using Google's Chart API to Create Charts from a CSV and Shapefile
如何将shp转换为tab(esri shapefile转换为mapinfo)
如何将esri shapefile转换为geodatabase
How to Convert MapInfo TAB to Esri Shape
How to Convert Microsoft Excel to Esri SHAPE
© 2019 亚搏在线Safe Software Inc |Legal