span8
span4
span8
span4
Previous: Creating a Polygon from Line Segments
In order to correct topology errors,you should first test to which features break the appropriate topology rule for your dataset.In this article,you will learn how to use FME to identify topological errors using the SpatialFilter.To see more data validation scenarios,check out theData Validation and QA with FMEtutorial.
correcting-topology-errors.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 exercise,you will test for topological errors in a linear dataset.You are testing your dataset because you want to ensure the dataset was digitized correctly and bike path segments are snapped together.
You will use the touches predicate to see which lines have been snapped together and which lines are disjoint.
Next,you will add two Inspectors to the workspace.
After running the workspace,the output will automatically be displayed in the FME Data Inspector.Notice 12 line features are not topologically correct.You will learn how to correct these features in exercise 1b using the same workspace.Please save your workspace.Do not close this workspace as exercise 1b will continue where you left off.
In exercise 1a,you tested for topological errors in a linear dataset by checking for disjoint lines.In this exercise,you will be correcting the disjoint features (identified by the
Since you are building off of the previous exercise,the workspace could start getting a little cluttered.To prevent this from happening,you will learn how to use bookmarks to keep the canvas organized.
Using bookmarks is a way to define areas of the workspace for easy access.Collapsible Bookmarks are available in FME versions 2018+.For more information on using collapsible bookmarks,see theDesktop Basic Course Manual.
Since the SpatialFilter is testing for touching bike path segments,you want to correct the segments that are failing this test.
Vertex snapping will snap line vertices together if their distances are within the specified tolerance.For more information on tolerance parameters,see theDesktop Basic Course Manual.
Note: The snapping distance is measured in map units which are meters in this case.
TheFeatureWritercan be used instead of a conventional FME writer.Using the FeatureWriter allows post-processing of writer results.In this case,we will use the FeatureWriter so we can re-test the written features using the same logic to confirm that our features have in fact been corrected.
Since we have already created a spatial test for our features,we can simply copy and paste the existing transformers to reuse them.
When you view the data in the FME Data Inspector you will notice that the number of disjoint features has been reduced from 12 to 1 by snapping line vertices.
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