Introduction
How Do I Do That in FME is a series of articles that focuses on the same five categories covered by its predecessors:
- Database Management
- Database Creation
- Data Manipulation
- Data Analysis
- Data Display and Presentation.
The intention of this guide is to assist new users and GIS professionals who need guidance when performing a common task in FME.
If you are a new FME user, please consider visiting the FME Academy to learn more about the free online training provided by Safe Software or explore our Knowledge Base. For other GIS-specific articles, see Working with GIS Data and FME.
Database Management
- Adding a Column to a Table: This tutorial will walk you through how to append a new column to an existing Microsoft Excel spreadsheet using the AttributeManager.
- Sorting Tabular or Graphical Data: This tutorial will walk you through how to sort tabular data in Visual Preview and using the Sorter transformer.
- Calculating Values for New Fields: In this tutorial, you learn how to calculate values using the ExpressionEvaluator and how to assign values using the AttributeValueMapper.
-
Relating Data Files and Fields: This tutorial will teach you how to join features from two database tables using a primary key, but the method can be modified to combine features from multiple data types (for example, a shapefile and a database table).
Database Creation
Assigning Topology
- Creating a Polygon from Line Segments: In this tutorial, you will create polygons for city blocks from a street network that consists of Arterial, Residential, Private, and Non-city streets using the AreaBuilder.
- Correcting Topological Errors: In this article, you will learn how to use FME to identify topological errors using the SpatialFilter.
- Creating Lines from Points: The LineBuilder connects input point features in the order they enter, forming linear or polygonal features. The output features will contain a merged set of attributes from all features that were connected, where the value for an attribute in the resulting feature comes from the first feature that had an attribute with that name.
Data Manipulation
- Select Data by Area Masks: In this tutorial, you will select raster data within polygon features.
- Counting Vertices & Parsing Coordinates: The VertexCounter extracts a feature’s total number of vertices, storing the result in an attribute. The CoordinateExtractor transformer will retrieve your coordinate values based on the projection or coordinate system in which the data is stored.
Data Restructuring
- Convert from Raster to Vector: In this tutorial, you will learn how to convert raster data into polygons using the RasterToPolygonCoercer transformer.
- Converting Vector Data to Raster: In this tutorial, you will learn how to convert vector polygon features into raster data using the MapnikRasterizer, although this method also works for other geometries (such as points and lines).
- Modify Raster Cell Size by Resampling: In this tutorial, you will learn how to modify raster cell sizes using the RasterResampler transformer.
- Changing Raster Values by Geographic Feature: In this tutorial, you will learn how to select an area and change the values of raster cells by overlaying a polygon onto a raster dataset.
- Reducing Unnecessary Coordinates: In this exercise, you will learn how to simplify linear features by removing unnecessary coordinates using the Generalizer transformer.
Smoothing Data to Recover Sinuosity
- TIN from Point Data: In this tutorial, you will learn how to create a Triangulated Irregular Network (TIN) from a 3D point dataset using the TINGenerator. The TINGenerator can create TINs from Points/Lines or Breaklines, whether the features are 2D or 3D.
- RCaller: Interpolate Points to Raster Using Kriging (Kriging from Point Data): This example shows how the RCaller can be used to create a raster from point data. Kriging, an interpolation method, is used to create an estimated surface from cell signal point data.
- Generate Contour Data from Points: In this tutorial, you will learn how to create contour lines using the ContourGenerator and a point dataset. The ContourGenerator constructs a Delaunay triangulation based on the input 3D point features, which are then used to generate contour lines.
- Generate Contour Data from Raster: In this tutorial, you will learn how to create contour lines using the ContourGenerator and a Digital Elevation Model (DEM).
Data Transformation
- Projection Definition and Coordinate Transformation: In this tutorial, you will learn how to define a coordinate system in FME Workbench and how to reproject data to another coordinate system using the Reprojector transformer.
Vector Overlay
- Polygon in Polygon Overlay: In this exercise, you will learn how to perform a union between overlapping polygon features using the AreaOnAreaOverlayer.
- Point in Polygon Calculations with the PointOnAreaOverlayer: In this exercise, you will learn how to perform a spatial join between point features that are contained within polygons using the PointOnAreaOverlayer.
- Topological Intersection: In this exercise, you will use the SpatialFilter to set a spatial predicate that will determine which polygon features are merged together.
- Line in Polygon: In this exercise, you will use the SpatialFilter to set a spatial predicate that will determine which line features intersect polygon features.
Data Analysis
Raster Processing
- Simple Examples Using the RasterExpressionEvaluator Transformer: This article demonstrates commonly used raster transformations with the RasterExpressionEvaluator. The RasterExpressionEvaluator is a transformer that evaluates expressions on each cell in a raster, such as algebraic operations or conditional statements.
- Raster Calculations and Raster Palettes: In this article, we will calculate the Normalized Difference Vegetation Index (NDVI). The more infrared light is reflected, and the more red light is consumed, the healthier the plant is.
- Raster Neighborhood Functions: The RasterConvolver is a transformer that applies a convolution filter to raster data. Convolution filters are applied using a kernel specified by a matrix of weights over neighboring values. Filtering can be used to smooth, sharpen, and enhance edges, as well as for other raster image manipulation operations.
Statistical Function
- Calculating Areas, Perimeters and Lengths: In this tutorial, you will learn how to calculate the area and perimeter of polygon features, as well as calculate the length of line features.
- Pivot Tables and FME: This article demonstrates FME transformers for constructing a pivot table.
General
- Buffering features for Spatial Relationship Analysis: When assessing spatial relationships, a common scenario is determining whether one feature is within X distance of another.
- Polygons Within Distance of Selected Features: With FME, you can perform the same task by querying your data with a Tester to “select” the desired feature(s), then select the features that pass the query using the NeighborFinder.
- Find Nearest Features: In this tutorial, you will learn how to find the nearest features using point and polygon datasets. The purpose of this operation is to find the nearest feature from an object of interest based on the straight line distance between features.
3D Analysis
- Raster Slope Calculations: Raster slopes can be measured in two ways: the slope angle and the slope aspect (direction). In FME, slope angle is measured with the RasterSlopeCalculator transformer and the slope aspect with the RasterAspectCalculator.
- Calculate Strahler Stream Order Numbers: Stream order can be used to identify and classify stream types by the number of tributaries connected to a stream. This tutorial will cover how to prepare your data before using the StreamOrderCalculator transformer to determine stream order using the Strahler Algorithm.
Network Functions
- Shortest Route Calculations with the ShortestPathFinder: Shortest route calculations are done in FME using the ShortestPathFinder transformer. This transformer calculates the shortest path from a source node to a destination node on a given network.
- Creating Time and Distance Isolines using the NetworkCostCalculator: Isodistances depict lines of equal distance from an origin, and isochrones depict lines of equal time. In many cases, they are used to depict travel distances and travel times. FME can create isodistances and isochrones using the NetworkCostCalculator transformer combined with the ContourGenerator transformer.
- Geocoding Addresses: In this tutorial, you will learn how to geocode addresses using the Forward and Reverse Geocoding Modes of the Geocoder transformer.
Data Display and Presentation
- Map and Map Feature Annotation: In this tutorial, you will learn how to create labels for point features and how to create a center point in polygons, which can then be converted to a label point.
Additional Resources
Data Attribution
The data used here originates from open data made available by the City of Vancouver, British Columbia. It contains information licensed under the Open Government License - Vancouver.