span8
span4
span8
span4
Previous: Specify Distance Buffers
Typically select by location is done using a graphical user interface like ArcMap or QGIS.However, in FME you can perform the same task by querying your data with aTesterto “select” the desired feature(s), then select the features that pass the query using theNeighborFinder.
polygon-within-distance-of-selected-features.fmwt
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 scenario, you will learn how to query the school's dataset in order to select parcel polygons within 200m of King George Secondary and Henry Hudson Elementary.
The Tester will be used to “select” schools from the dataset.You will set two test conditions that will use the Pass Criteria “Any Test (Or)” - meaning if any test passes, the input feature will be classified as passed.For more information on the Tester and Pass Criteria, see theTester Documentation.
The two test clauses should be entered as follows:
Left Value | Operator | Right Value | Negate | Mode |
school_name | = | King George Secondary | Case Insensitive | |
school_name | Begins With | Henry | Case Insensitive |
In this case, you will use the default pass criteria, Any Test (OR), your Tester Parameters dialog should match the screenshot provided below:
So far, your workspace should look like the screenshot below:
The NeighborFinder takes in two sets of features - Base and Candidate.For each Base feature, the transformer checks the Candidates for matches, based on proximity and parameter selections.In this case, it will check all Candidates that fall within a specified distance of the Base feature.For more technical information on the NeighborFinder see theDocumentation.Alternatively, to learn more about Spatially Based Join Transformers see theDesktop Basic Course Manual.
The Maximum Distance is measured in the units of coordinates of the input features - meters in this case.
Note: To correctly analyze spatial relationships, all features should be in the same coordinate system.TheReprojectorreprojecting特性中可能是有用的吗 workspace.However, in this exercise, the features are already in the same coordinate system.
After running the workspace, you will have a new dataset of the parcels within 200m of the King George Secondary and Henry Hudson Elementary in the DWG format.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 NeighborFinder:Matched port to automatically open the output in the FME Data Inspector after the translation has successfully run.
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