Answer the question
In order to leave comments, you need to log in
How to split a Polyline into 1KM points?
Good afternoon, I ran into a problem that today I have a path: It is
necessary to divide this path into points by N distance, in this case, 1 kilometer (let's say) and at the output you need to get Lat and Lon of each kilometer
For clarity:
The path calculates: map. project-osrm.org
What is at the input:
1) 2 points A and B for building a route
2) Route from straight lines in the form of an array
3) Headache
Answer the question
In order to leave comments, you need to log in
head-on solution:
1) go along the lines of the polyline and sum the length according to the formula
Although if we are talking about coordinates, then here
2) if the length is less than 1 km, then go to the next polyline (pair of points)
3) if the length is more than 1 km, then you need to divide the current line
, you can use the following formula www.pm298.ru/reshenie/delen.php, but this will not be entirely accurate, since we are talking about coordinates
here you need to add. a study for which I don’t have time :) here is what I googled www.pereplet.ru/nauka/Soros/pdf/0008_115.pdf, it can help ...
PS how blind I am, I gave you the answer
Destination point given distance and bearing from start point
www.movable-type.co.uk/scripts/latlong.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question