CurveFitter
From Fmepedia
Curvefitter is a Workbench Transformer.
The Curvefitter Transformer is based on linear optimization technology licensed from TCI Corp (http://www.tcicorp.com/). It is available for purchase as an add on to Premium editions of FME 2007.
Curvefitter even has its own page on the Safe web site (http://www.safe.com/curvefitter) and an article about it in Directions Magazine (http://www.directionsmag.com/article.php?article_id=2476&trv=1).
Curvefitter smoothes lines derived from line segments, points or raster data, and replaces a series of line segments with the optimal combination of straight lines and embedded arc segments required to create smooth curving lines. This process provides a truer representation of real-world features and reduces file sizes by up to 80% - a great benefit when the data is intended for visualization or download over the Internet.
In addition to processing simple line features, Curvefitter preserves feature topology when smoothing boundaries of adjacent area features.
Before the advent of rich geometry, FME was forced to stroke arcs into line sections to be able to process that data. Many other GIS packages that did not support arcs also ended up forcing the stroking of arcs, the net results being a great amount of data that could be represented by arcs but isn't. The Curvefitter transformer will allow a user to replace such stroked line segments with true mathematical arc segments. It will likewise permit the replacement of surveyed line features with an arc representation.
Precision is the main transformer setting that guides the curve fitting process. It sets the maximum deviation allowed at any point along the polyline between the original and the resulting polyline.
A Flattening setting allows very flat curves to be represented by straight segments. Any curve that has a mid-ordinate less than this amount will be replaced by a straight segment. A typical value is 10% of the precision setting.
The values of the three Weight settings determine the importance of the three factors relative to each other. Compression is the reduction in the number of vertices. Smoothness is the tangency of consecutive segments - how close the end angle of a segment is to the start angle of the next segment. Accuracy is how closely the resulting curve overlays the original.
To get practical hints on using this transformer, see the document on getting the most out of Curvefitter.
Example 1
Here an FME user has recorded a route on his GPS unit. The points on the route show a certain amount of error, weaving about to produce an erratic centre-line (green line). By using CurveFitter, the errors have been reduced to a smooth route that includes a number of arcs (black line).
Example 2
This time a road-centreline has been surveyed - very crudely - and run through CurveFitter. Although the output (red) is far from perfect, it does demonstrate how replacing surveyed data with a mathematical arc can provide a truer representation of a real-world feature.
Example 3
An FME user has a map of the world and, not needing such a highly detailed and precise dataset, has been run it through the CurveFitter to produce a more generalized output.
>>>
Here the same process is applied solely to South America...
>>>
Notice how, even though the boundary of each country has been generalized, all boundaries still join correctly, with no gaps.
The benefit of doing this? A 65% reduction in file size...
