[FME-HOW-TO Series] 25 polygonal line

Outline

In this exercise, you will use SpatialFilter installation space predicate to determine which line and polygon features elements intersect. SpatialFilter will compare two sets of elements, their spatial relationship to see whether the test conditions selected. Being tested elements ((Candidate elements For example, if you have a set of road data (line), and you want to extract all the way through the park (polygons), you may be directed to the road) is recognized as having been passed or failed the test. Candidate input port, and Park guided to the Filter input port.


download

topological-intersection.fmwt

mountpleasantclipboundary.zip

streets.zip

Note: Because you are dealing with public-oriented database, so it might cover and / or modify the table. If your conversion unexpected results, please refer to the reset PostGIS Training Database article . Alternatively, you can download the files provided, using the appropriate format read module replacement PostGIS read module .

Exercise

In this case, you will be the line type street feature and MountPleasantClipBoundary polygon features to merge , and the spatial predicate "Filter Intersect Candidate" to the Connection Properties. In this case, Neighborhoods dataset is a filter, because you want to extract all MountPleasantClipBoundary intersecting streets and the combined properties of the two elements.

Explanation

1. Start FME Workbench

  • If not already open, start FME Workbench.

2. Create a new workspace

  • In the "Start" page "to create a workspace " section, select "Create new workspace " option.

3. Add PostGIS read module

  • Start Type "PostGIS" without any content is selected on the canvas, and then double-clicking or by using the arrow keys and the Enter key from the read module select PostGIS format list to add it to the canvas.
  • Next, the connection module read select PostGIS Training Database list. If you have not set up a database connection, select "Add Database Connection" and enter the following parameters:
  • Next, open reading module parameters , and the table column selection MountPleasantClipBoundary Streets and tables.

4. Add Spatial Filter

  • And add read module similar, type "SpatialFilter" to display the FME converter list. Double- converter list SpatialFilter, or using the arrow keys and the Enter key to add it to the canvas.

The connector input of the converter

  • The MountPleasantClipBoundary reading module connected to SpatialFilter: Filter port. Similarly, the Streets reading module connected to SpatialFilter: Candidate port. Your connection should look like the following screenshot:

In this case, you do not have to modify the parameters of any SpatialFilter, because by default, space predicate is "Filter Intersects Candidate", and you have selected Merge Attributes. For more information about SpatialFilter how it works, see SpatialFilter documentation .

6. Add Inspector

  • Next, add a connector and to the Inspector SpatialFilter: Passed port.

This will display the FME Data Inspector MountPleasantClipBoundary polygon intersection after the conversion operation streets .

7. Add Esri geodatabase (File Geodb Open API) write module

  • And add read module similar, type "Geodatabase", then the write module selected Esri geodatabase (File Geodb Open API) format list.
  • By clicking the ellipses data set, create a new folder or use an existing file extension file called .gdb folder, and then select .gdb folder (ie C: \ Users \ Documents \ MountPleasant \ Streets.gdb) to specify a file geodatabase database folder. After you specify the file geodatabase folder location, the "table definition" is set to "Auto", then click "OK." To learn more about using Esri geodatabase, see " geographic database entry ," a text.

Automatic property definition refers Workbench according to the connected read module feature class is automatically defined list of attributes, for more information about the attribute definitions, see About modules feature class to write the document .

  • Finally, write module parameter setting feature class name and in the resulting dialog box set geometric objects , then click "OK" will geodatabase write module added to the "canvas." In this case, SpatialFilter output polygon features, so you should set geometry types: geodb_polygon.
  • Set feature class name and specify geometric objects , click OK to Esri geodatabase write module added to the canvas.
  • Add writing module after connecting it to SpatialFilter: Passed port.

8. Run the workspace

  • Click "Run" button on the toolbar, or "run" on the menu bar> "Run conversion" Run workspace . Because you attach the Inspector, the output will automatically appear in the FME Data Inspector in.

result

Entry

Export


converter

  • The Inspector  -Thefeatureis sent to the FME Data Inspector for display.
  • SpatialFilter  -The spatial relationship filtration point, line, and textelements.

 

Published 350 original articles · won praise 169 · views 360 000 +

Guess you like

Origin blog.csdn.net/fmechina/article/details/103493841