1

In a routing application,probably using osm as base layer, how do I get a line-string that goes through the road and not directly from one point to another?

Is there any software,like an API?

I have seen pgRouting will it do the road?

Do I need to downlaod any data?

So for example I have this situation where point A is a starting geometry point and B is the ending geometry point and the black line is the road:

Fist example

If I want to use a layer with a linesting feature from Point A to B it will look like this: (the red line is the linestring and the black one is the road.)

Second example

But what I want is the linestring to follow the road like this:

Third example

Suppose that the red like goes exactly like the black line and completely follows the road without us adding any other geometry points other than A and B!

Note that I am using OpenLayers API and I am not asking for a whole routing package, I would like to know how to connect geometry point with 'road' or 'highway' nodes.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
drizo
  • 427
  • 4
  • 12
  • @underdark My friend why duplicate? I am not asking for pgRouting or any other api/software. I am asking for a way to connect road nodes to geometry points ? I can't find any similar questions – drizo Sep 26 '14 at 16:56
  • 1
    Do you want to compute a route from A to be? Then you need routing software. If not, then I'm afraid I don't understand the question as it's currently written. – underdark Sep 27 '14 at 19:21
  • @underdark I would like to use the road network data in open street map, and write all the algorithms by myself. Routing software has the algorithms already written. When you say routing sofware you mean an api? – drizo Sep 28 '14 at 11:35
  • 1
    Could you explain why you want to write the algorithms yourself if the problem of routing has already been solved multiple times before? If you want to write it yourself, which programming language do you want to use? Of course I can reopen your question but I doubt that the current problem description is enough to provide the answer you're looking for. One issue I have: first you talk about pgRouting, then you say that you're not asking for a whole routing package ... Try to rewrite to focus exactly on what you want to achieve. – underdark Sep 28 '14 at 14:38
  • @underdark You are right. The thing is that I am really new to this and I can't exactly tell what I want. All I do is a application on a website that is used for routing and comodal transportation. Up to now I used OpenLayers APi and OpenStreetMap data. I want now to embed some algorithms I know into the application that will connect a point A to a point B throught the road network nodes.I suppose I could use an API for this(like pgRouting) but what if I wanted to have access to the road network data and write the algorithms on my own? In python? what would I need? Thank you! I appreciate it! – drizo Sep 28 '14 at 15:50

0 Answers0