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.
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
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.