Exercise 2 | Flood Risk Project |
Data | Parks (MapInfo TAB) |
Overall Goal | Assess flood risk for addresses based on elevation and distance from shore |
Demonstrates | Conditional attribute values |
Start Workspace | C:\FMEData2018\Workspaces\DesktopAdvanced\Attributes-Ex2-Begin.fmw |
End Workspace | C:\FMEData2018\Workspaces\DesktopAdvanced\Attributes-Ex2-Complete.fmw |
A colleague is working on a workspace to calculate the tsunami flood risk for all addresses in the city. The risk is adjudged to be a combination of closeness to the shoreline and elevation above sea level, and is calculated using this table:
Elevation (meters above sea level) | ||||
0-10m | 10-25m | 25-60m | ||
Distance from Shoreline (meters) | 100m | 1 | 2 | 3 |
200m | 2 | 3 | 4 | |
300m | 3 | 4 | 5 |
Your colleague has created the workspace up until the point at which each address has an elevation and distance from the shoreline. Now the calculations need to start, and he has asked for your assistance in finishing the project.
1) Start Workbench
Open the workspace C:\FMEData2018\Workspaces\DesktopAdvanced\Attributes-Ex2-Begin.fmw. This is the workspace as your colleague has created it so far.
To find out what data we are dealing with, run the workspace and then inspect the results at various parts. You can do this either using Inspector transformers or Feature Caching.
You’ll probably want to inspect the source feature types (or the Reprojector, since the CDED data is a different coordinate system). You’ll also want to inspect the AttributeRenamer output.
Don’t forget you can set a Group-By in an Inspector's parameters, which may be of use in visualizing which addresses are in which zone.
You’ll see how the addresses are assigned a zone denoting their distance from the shoreline, and also possess an elevation.
Ms. Analyst says... |
Before we get onto a full set of instructions for the exercise, try to consider how you might go about this task. You’ll need to think about:
|
Miss Vector says... |
On consideration, I see three likely ways to carry out this project. I call them:
Complex Filtering filters the data in a single step, so no further mapping is required. It’s a single-step process, but – because the data is filtered – needs more transformers than perhaps necessary. It is moderately complex. Conditional Values set the values directly depending on a set of inbuilt conditions. All the work can be done in a single transformer, so it is compact, but the setup and maintenance are considerably more complex. On the following pages, we’ll detail how to set up each method. Pick which one you want to try and follow the instructions. Alternatively, do each in turn – then you’ll be able to compare the different methods and decide which you think is the best. BEWARE! Be sure to check your use of AND and OR in filter transformers. It's easy to get one wrong but difficult to track that down as the cause! |