Skip to main content
Question

Let you guide you to measure the width of any road

  • Mar 20, 2021 12:30 AM UTC
  • 4 replies
  • 322 views

Let you guide you to measure the width of any road

4 replies

danilo_fme
Celebrity
Forum|alt.badge.img+58
  • Celebrity
  • Mar 21, 2021 12:31 AM UTC

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+71
  • Evangelist
  • Mar 23, 2021 10:51 AM UTC

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
  • Mar 23, 2021 11:07 AM UTC

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
  • Mar 23, 2021 11:26 AM UTC

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