Solved

How do I add clothoids (spirals) to a geometry?

  • 28 September 2022
  • 10 replies
  • 11 views

Badge +2

Hey there,

I need to transform a CSV-formatted file containing Geometry assignments into LandXML. Therefor geometry describing/containing clothoids need to be clothoids in the LandXML. They can be at the start, in the middle or at the end of a (line) geometry. I know how to create linear geometry (VertexCreator) and arc geometry (2DArcReplacer). But clothoids? 🤷‍♀️

icon

Best answer by nielsgerrits 28 September 2022, 12:55

View original

10 replies

Userlevel 6
Badge +32

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.

Badge +2

So the Creator is just a "helper transformer" to get the XML description?

Userlevel 6
Badge +32

It can have different functions, but I use it to generate geometries like these or initiate FeatureReaders.

Userlevel 4

I'll just add that you can use the PathBuilder to join polylines, arcs and clothoids into a single line geometry.

Badge +2

I'll just add that you can use the PathBuilder to join polylines, arcs and clothoids into a single line geometry.

Screenshot LineCombiner LogBut PathBuilder closes the geometry. How can I prevent this? LineCombiner throws an error when connecting all the lines, arcs and clothoids.

Userlevel 4

Screenshot LineCombiner LogBut 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?

Badge +2

Screenshot LineCombiner LogBut 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]

 

Screenshot unjoined Lines 

Second picture: one closed path

Screenshot PathBuilder 

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?

Userlevel 4

Screenshot LineCombiner LogBut 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.

Badge +2

Screenshot LineCombiner LogBut 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.

Badge +2

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!

Reply