Solved

2D points with elevation interval to 3D lines

  • 13 December 2019
  • 4 replies
  • 22 views

Badge

How this can be achieved in FME?

https://support.esri.com/en/technical-article/000011817

Source data – 2D point geometry with attributes 'FROM' and 'TO' (elevation values stored). The goal is to create 3D lines from those values.

icon

Best answer by nielsgerrits 13 December 2019, 07:49

View original

4 replies

Badge +3

Assign Unique Row ID if there isn't one already: Use Counter.

Send it first to VertexCreator:

  • Mode: Replace with Point
  • X: @XCoord()
  • Y: @YCoord()
  • Z: The "FROM" Attribute

Then send to another VertexCreator, and do the same with the "TO" Attribute. The result of both VertexCreators is transforming the 2D From and To Points to 3D Points

Pipe both of the VertexCreator's Output Ports to a LineBuilder

  • Create the 3D lines from the now 3D Points by setting the "Connection Break Attribute" to the Unique Row ID / Counter Attribute

Depending on your Feature Order control in the Workspace, you may first need to put it through a Sorter to make sure it is ordered by From Points first, and To Points second entering LineBuilder.

 

Userlevel 6
Badge +33

One way to do this is to use a GeometryReplacer.

2D points with elevation interval to 3D lines (2019.1.2).fmwt

0684Q00000ArLWDQA3.png

Set the Geometry Encoding to FME XML:

0684Q00000ArLmKQAV.png

Enter the following XML:

<?xml version="1.0" encoding="US_ASCII" standalone="no" ?>
<geometry>
    <line>
        <coord x="@XValue()" y="@YValue()" z="@Value(From)"/>
        <coord x="@XValue()" y="@YValue()" z="@Value(To)"/>
    </line>
</geometry>

Result:

0684Q00000ArLgqQAF.png

The way to find this is to use a Creator to create a sample geometry, for example a 3D line. 

0684Q00000ArLmnQAF.png

Then go to the XML tab to find the FME XML.

0684Q00000ArLmjQAF.png

Then replace the coordinates with placeholders.

Userlevel 2
Badge +17

Another thought, 3DForcer and Extruder could also be useful.

Badge

All three methods work just fine. Thank you guys!

Reply