span8
span4
span8
span4
A common GIS operation is to overlay two (or more) polygons to subtract the area of one polygon from another.
For example,I might have a polygon representing the outline of a town or city.I also have a dataset of polygons representing residential areas.By overlaying the two I can subtract one from the other to identify parts of the city that are not residential areas.
FME has several transformers that will overlay data,but to cut out parts of a polygon the best solution is the Clipper transformer.
The source datasets for this example are a set of polygons representing parks (in MapInfo TAB format) and a set of polygons representing buildings (in AutoCAD DWG format).In the FME Data Inspector it looks like this:
A common task is to calculate the area of parks to assess what grounds maintenance needs to be carried out.Of course,this should not include the area occupied by buildings.This example builds a workspace to subtract building footprints from parks before measuring the area of those parks.
1.Start FME Workbench and begin with an empty canvas.
Select Readers > Add Reader from the menubar.
Set the data format to Autodesk AutoCAD DWG/DXF.Select the attached DWG data as the source dataset.If prompted,select only the BuildingFootprints layer,not layer 0.
2.Again,select Readers > Add Reader from the menubar.
This time set the data format to MapInfo TAB (MITAB).Select the attached MapInfo TAB dataset as the source.
3.Add an AreaCalculator transformer,connected to the Parks feature type.The workspace will now look like this:
Open the parameters dialog and set up the AreaCalculator to store the area of each park in an attribute called TotalParkArea.This will be the area of each park before buildings are subtracted.
4.Add a Clipper transformer.Connect the BuildingFootprints feature type to the Clipper:Clipper port,and the AreaCalculator:Output to the Clipper:Clippee port:
Open the parameters dialog to check the Clipper parameters.The most important parameter is "Clipper Type",which should be set toMultiple Clippers.
5.Add a second AreaCalculator.Connect it to the Clipper:Outside port.The outside port will be the parts of the park features that fall outside of a building footprint.Open the parameters and set it up to store the area of each park in an attribute called ParkLandArea.
6.Add an Inspector transformer (connected to the second AreaCalculator) and run the workspace.Each park will have had the building footprints cut from it,and will possess a measurement of area both with and without buildings:
Also check for an attribute called _clipped.It will show whether the park had a building cut out or not.If that attribute is set tonothen the before and after area should be the same.
Point in Polygon Calculations with the PointOnAreaOverlayer
Distance Measurements with the LengthCalculator
Buffering features for Spatial Relationship Analysis
Shortest Route Calculations with the ShortestPathFinder
Determining Spatial Relationships
Coordinate Systems and Measurements with the Reprojector
Calculating Stream Network Numbers with the StreamOrderCalculator
© 2019 亚搏在线Safe Software Inc |Legal