You can create a clothoid using a Creator transformer.
As an extra you can use a GeometryExtractor (encoding FME XML) to get an XML describing the parameters:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<geometry>
<clothoid>
<startCoord x="0" y="0"></startCoord>
<endCoord x="-0.27390607603951506" y="1.0140946349460176"></endCoord>
<localStartCoord x="0" y="0"></localStartCoord>
<startDirection>0</startDirection>
<startCurvature>1</startCurvature>
<endCurvature>2</endCurvature>
<length>3</length>
</clothoid>
</geometry>
Next you can edit these parameters in the XML and recreate the geometry from XML using the GeometryReplacer.
So the Creator is just a "helper transformer" to get the XML description?
It can have different functions, but I use it to generate geometries like these or initiate FeatureReaders.
I'll just add that you can use the PathBuilder to join polylines, arcs and clothoids into a single line geometry.
I'll just add that you can use the PathBuilder to join polylines, arcs and clothoids into a single line geometry.
But PathBuilder closes the geometry. How can I prevent this? LineCombiner throws an error when connecting all the lines, arcs and clothoids.
But PathBuilder closes the geometry. How can I prevent this? LineCombiner throws an error when connecting all the lines, arcs and clothoids.
Can you show us a screenshot of the result returned by the PathBuilder, as well as a what you would like to have?
But PathBuilder closes the geometry. How can I prevent this? LineCombiner throws an error when connecting all the lines, arcs and clothoids.
Sure, first picture: single line feaures [7]
Second picture: one closed path
My allover goal is to create the geometry from a data format called XTR (TopoRail - from Swiss Federal Railways SBB). The geometry is defined with parameters for lines, arcs and clothoids (aka curves, spirals). Besides the problem of connectiong single lines into one I struggle with creating clothoids. With the Creator as a helper transformer I now know how to define them. But I don't know how to calculate the parameters 'endCoord', 'startCurvature' and 'endCurvature'. I guess it's just algebra, but I cannot find the correct formular.
I have following parameters given:
StartCoordinates x, y (m)
StartDirection (gon)
Length (m)
StartRadius (m)
EndRadius (m)
Any ideas?
But PathBuilder closes the geometry. How can I prevent this? LineCombiner throws an error when connecting all the lines, arcs and clothoids.
Concerning the PathBuilder, you may have to make sure that the elements arrive to the transformer in the correct logical order, and that they are oriented in the order of the complete line. From the documentation of the PathBuilder:
If the end point of one input segment does not match the following segment's start point, geometry will be added to connect them in the following way.
That might perhaps explain what you're observing.
But PathBuilder closes the geometry. How can I prevent this? LineCombiner throws an error when connecting all the lines, arcs and clothoids.
Yes! Thanks @david_r ! I was already sure the lines are correctly sorted, but weren't.
In case someone needs to know more about clothoids: http://ww3.cad.de/foren/ubb/uploads/Clayton/Klothoide-Formeln.pdf [german] helped me a lot!