Skip to main content
Question

Let you guide you to measure the width of any road


Let you guide you to measure the width of any road

4 replies

danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • March 21, 2021

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

 

 


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • March 23, 2021

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)))

 


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • March 23, 2021

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.


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • March 23, 2021
caracadrian wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings