span8
span4
span8
span4
Previous: Raster Neighborhood Functions| Next:Cross Tabulation of Two Data Categories
Area,perimeter,and length can be calculated for features using transformers such as theAreaCalculatorandLengthCalculatorin FME.In this tutorial,you will learn how to calculate the area and perimeter of polygon features that are stored in the PostGIS Parks table,calculate polygon perimeters,and calculate the length of bike paths in the Vancouver area.
Note: Since you areworking on a public facing database,tables can occasionally be overwritten and/or modified.If your translation produces unexpected results,see theResetting the PostGIS Training Databasearticle.Alternatively,you can download the provided file(s) and replace the PostGIS reader with a reader of the appropriate format.
In this exercise,you will learn how to calculate the area of park polygons using the AreaCalculator.Determining the area of each park will help you understand the distribution of green space throughout the city.For more information on calculating statistics using polygon areas,see theDesktop Basic Course Manual.
Note: the shortcut to generate a workspace is Ctrl+G
Note: Drop and Create is used when a table needs to be emptied and an update is made to the database schema.For example,drop and create is used to remove the table structure,possibly to add or remove columns,change data types,etc.For more information on Writer Feature Type Parameters such as Table Handling,see theWriter Feature Type ParametersDocumentation.
Note: An Automatic Attribute Definition is when Workbench automatically defines the list of attributes,depending on which Reader feature types are connected.Further,the list of attributes on the Writer feature type will update automatically whenever attributes are changed (i.e.renamed,removed,etc.) in the workspace.For more information on User Attributes and Attribute Definitions,see theDocumentation.
The FeatureHolder reads and stores the features in the Parks table.Once all of the features have been stored,the existing table is closed and which allows FME to drop the existing table and create the new table.
Note: the area is calculated in square map units.
After running the translation,your table will have a parkarea column with the area for each polygon feature.You can view the new table by selecting the writer and clicking the Inspector button in the shortcut menu that appears when the writer is selected.Alternatively,you can attach an Inspector to the output of the final transformer in the workspace if you wish to automatically open the workspace output the FME Inspector.
In this exercise,you will learn how to calculate the perimeter of park polygons using the LengthCalculator.
Note: the shortcut to generate a workspace is Ctrl+G
Note: Drop and Create is used when a table needs to be emptied and an update is made to the database schema.For example,drop and create is used to remove the table structure,possibly to add or remove columns,change data types,etc.For more information on Writer Feature Type Parameters such as Table Handling,see theDocumentation.
Note: An Automatic Attribute Definition is when Workbench automatically defines the list of attributes,depending on which Reader feature types are connected.Further,the list of attributes on the Writer feature type will update automatically whenever attributes are changed (i.e.renamed,removed,etc.) in the workspace.For more information on User Attributes and Attribute Definitions,see theDocumentation.
The FeatureHolder reads and stores the features in the Parks table.Once all of the features have been stored,the existing table is closed and which allows FME to drop the existing table and create the new table.
This will add a new column to the table and calculate the perimeter of each polygon feature in the dataset.Leave all other parameters as default and click OK to accept the changes and close the LengthCalculator parameters.
Note: the perimeter is calculated in map units.
After running the translation,your table will have a perimeter column with the perimeter for each polygon feature.You can view the new table by selecting the writer and clicking the Inspect button in the shortcut menu that appears when the writer is selected.Alternatively,you can attach an Inspector to the output of the final transformer in the workspace if you wish to automatically open the workspace output the FME Inspector.
In this exercise,you will learn how to calculate the Length of bike paths using the LengthCalculator.To learn more about calculating length,see theDistance Measurements with the LengthCalculatorarticle.
Note: the shortcut to generate a workspace is Ctrl+G
Note: Drop and Create is used when a table needs to be emptied and an update is made to the database schema.For example,drop and create is used to remove the table structure,possibly to add or remove columns,change data types,etc.For more information on Writer Feature Type Parameters such as Table Handling,see theDocumentation.
Note: An Automatic Attribute Definition is when Workbench automatically defines the list of attributes,depending on which Reader feature types are connected.Further,the list of attributes on the Writer feature type will update automatically whenever attributes are changed (i.e.renamed,removed,etc.) in the workspace.For more information on User Attributes and Attribute Definitions,see theDocumentation.
The FeatureHolder reads and stores the features in the BikePaths table.Once all of the features have been stored,the existing table is closed and which allows FME to drop the existing table and create the new table.
Leave all other parameters as default and click OK to accept the changes and close the LengthCalculator parameters.
Note: length is calculated in map units.
After running the translation,your table will have a length attribute with the length of each line feature.You can view the new table by selecting the writer and clicking the Inspect button in the shortcut menu that appears when the writer is selected.Alternatively,you can attach an Inspector to the output of the final transformer in the workspace if you wish to automatically open the workspace output the FME Inspector.
Data used in this tutorial originates from open data made available by theCity of Vancouver,British Columbia.It contains information licensed under the Open Government License - Vancouver.
© 2019 亚搏在线Safe Software Inc |Legal