Skip to main content
Let you guide you to measure the width of any road

Hi @mauliem​ 

 

There is the transformer LengthCalculator.

 

https://docs.safe.com/fme/2021.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/lengthcalculator.htm

 

 

Thanks in Advance,

Danilo

 

 


You can calculate the length and width of any polygon from area and perimeter, assuming the polygon is a rectangle. This assumption is usually realistic for road sections.

Calculate_Length_and_Width_from_Area_and_Perimeter 

The AreaCalculator returns the area of a polygon.

The LengthCalculater returns the perimeter of a polygon.

Approximate Length and Width can be calculated in the AttributeManager using the Arithmatic Editor:

Length = @Evaluate(@Value(Perimeter)/4 + @sqrt(@pow(@Value(Perimeter)/4,2)-@Value(Area)))
Width = @Evaluate(@Value(Perimeter)/4 - @sqrt(@pow(@Value(Perimeter)/4,2)-@Value(Area)))

 


It depends on the data that you have and what data you want to output.

You can use @geomancer​ 's method to get a general width OR:

You can use the road centerline to generate profiles at a given interval, extend those in both directions so they intersect the sides of the road, clip them (or do line on line and then select just the line that intersects the centerline) and send them to the LenghtCalculator. Prior to that you can add a measure to the centerline so you have the position alongside the centerline that the width corresponds to.


It depends on the data that you have and what data you want to output.

You can use @geomancer​ 's method to get a general width OR:

You can use the road centerline to generate profiles at a given interval, extend those in both directions so they intersect the sides of the road, clip them (or do line on line and then select just the line that intersects the centerline) and send them to the LenghtCalculator. Prior to that you can add a measure to the centerline so you have the position alongside the centerline that the width corresponds to.

I also suggest watching this clip from FME UC 2017 (3) Calculating River Width - Replacing the Measuring Tape by FME - FME UC 2017 - YouTube


Reply