others (#15) - Road segments (#377) - Message List

Road segments

Sorry for my poor english.This is not my language. I am developing a sytem to solve tsp.The data is from osm.I've already tested some funcions and they worked.But there is a problem, if the user set a point in the (X) how could it be identified.If he is in the road 1 (1-2) or on the road 2 (2-3) If we look for the nearest node, it's the node (3).But the point isn't in the street 2. One way to solve this problem(I don't know if it's the better)is to create many nodes between node 1 and 2.But how could i do it?

(1)|

X (3)------- | / |-

(2)

Thankyou for your attention

  • Message #1605
  • Message #1606

    You could look for the nearest road link instead of the nearest node. You can even identify the coordinates of nearest point on that road link then and split the road there.

    Functions for this are all provided by PostGIS. I don't remember the exact name now. If you can't find them, let me know.