Hi @sami26beniaouf,
You can use the CoordinateSwapper with an X <-> Z swap to switch the top view for a front view. To generate an image, use a PointCloudSorter to sort the points by the z component, ascending, then an ImageRasterizer. The sorting ensures that the closer points will overwrite the farther points.

Hello @daveatsafe,
Thank you for your reply, that's the solution i thought about but the road is not always in the same direction as x. Do you think it's possible to use a given direction like using the axe of the road?
Hi @sami26beniaouf ,
I'm not sure what the "axe" means, but if the angle of the road direction against the X axis is known, I think you can rotate the point cloud with Rotator to make the road parallel to the X axis, and then apply the method provided by @daveatsafe .
Hi @Takashi Iijima,
Thank you very much for your response,
i'm sorry i mean axis, I have the polyline of the road axis which is not a straight line. It's a good idea, but do you think we can find the angle between the road axis and the X axis localy in the point cloud location?
To find the angle and axis needed to rotate a road segment to vertical, you can use the following code in a PythonCaller:
import fmeobjects
import math
# Template Function interface:
def calcQuaternion(feature):
start = feature.getCoordinate(0)
end = feature.getCoordinate(1)
vector = [(end[0]-start[0]),(end[1]-start[1]),(end[2]-start[2])]
length = math.sqrt((end[0]-start[0])**2 + (end[1]-start[1])**2 + (end[2]-start[2])**2)
vertical = [0,0,length]
cross = [vertical[1]*vector[2] - vertical[2]*vector[1],vertical[2]*vector[0] - vertical[0]*vector[2],vertical[0]*vector[1] - vertical[1]*vector[0]]
dot = vertical[0]*vector[0] + vertical[1]*vector[1] + vertical[2]*vector[2]
cos = dot/(length**2)
# in some edge cases, a slightly out of bounds cos may be created
if cos > 1.0:
cos = 1.0
if cos < -1.0:
cos = -1.0
rotation = math.acos(cos)*180/math.pi
feature.setAttribute('_vector_x',cross[0])
feature.setAttribute('_vector_y',cross[1])
feature.setAttribute('_vector_z',cross[2])
feature.setAttribute('_rotation',rotation)
if rotation == 180 and cross == [0,0,0]:
feature.setAttribute('_length',-length)
else:
feature.setAttribute('_length',length)
Use the resulting _vector_x, _y, _z and _rotation value in a 3D Rotator to rotate the segment to vertical.
Thank you @daveatsafe and @Takashi Iijima. I'll try both methods !