A
A
Andrey Sokolov2015-01-05 11:53:35
OpenStreetMap
Andrey Sokolov, 2015-01-05 11:53:35

How to split a Polyline into 1KM points?

Good afternoon, I ran into a problem that today I have a path: It is
RQ0fV.jpg
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: VdZiG.jpg
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

1 answer(s)
A
An, 2015-01-05
@eX1stenZ

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 question

Ask a Question

731 491 924 answers to any question