R
R
Roman Gor2015-05-19 14:21:54
API
Roman Gor, 2015-05-19 14:21:54

How to find out if a point belongs to a specified segment?

I have a certain base of segments (steps) of the route:
Screen%20Shot%202015-05-19%20at%2014.19.
I have the coordinates of a point that exactly belongs to one of the specified routes. How do I know which route leg a point belongs to?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2015-05-19
@deliro

f1001.JPG
So get the equation of a straight line through 2 points.
Make sure that x0<= x <= x1 and y0 <= y <= y1 (x0 < x1, same as y0 < y1)
Insert a point into a line.
Check for equality.
Season with errors.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question