Jump to content

 
Photo

Algorithm to find distance of an uneven polygonal road

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Gauravjasraj

Gauravjasraj

    Newbie

  • New Member
  • Pip
  • 1 posts
  • India

Hi,
While working for my summer internship I have got a task to implement an algorithm to find the crosssecting points of two roads or more and then place that cross-section point a number and then find the distance of the previous roads to the new point and update it in the table. I tried Ramer douglas peucker line simplification algorithm to convert the road into a straight line and then find the intersection point but the point coming after this is not exactly the cross section point and the distance coming is also not the exact. Please help.

#2
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,891 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

Hi,
While working for my summer internship I have got a task to implement an algorithm to find the crosssecting points of two roads or more and then place that cross-section point a number and then find the distance of the previous roads to the new point and update it in the table. I tried Ramer douglas peucker line simplification algorithm to convert the road into a straight line and then find the intersection point but the point coming after this is not exactly the cross section point and the distance coming is also not the exact. Please help.


Well, for starters, don't simplify the lines because that changes the geometry and makes your results incorrect.

In general terms, you'll want to intersect the roads. This splits the original roads on their intersection point and creates new objects. Then you can calculate the length of those new roads. I think that should do the trick.
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->