Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to ask about what different of function : "astar_sp" and "shortest_path_astar" ?

Do you think the query's result from both of them is same or different?

share|improve this question

1 Answer 1

shortest_path_astar is a the basic function for the a-star algorithm. Other functions like astar_sp are wrapper functions that often simplify but also extend input parameters and further process the shortest path result, usually based on certain assumptions: http://workshop.pgrouting.org/chapters/shortest_path.html#a-star

You can create your own wrapper functions by modifying existing ones. But they all base on shortest_path_astar.

share|improve this answer
    
I see. Ok. Thankyou very much..:) I like ur answer mr.dkastl..:) –  robi_blitzx Jun 5 '12 at 2:56
    
Well, it's probably a good idea to then mark the question as "solved". –  dkastl Jun 5 '12 at 9:45
    
oia, i forgot to ask, the result is same, right ? –  robi_blitzx Jun 6 '12 at 0:16
    
The path is the same, but the format of the result will be different. –  dkastl Jun 6 '12 at 19:20
    
hmm, i have try both of them.. and result is : 1. the path is different. 2. the result of length(it's cost, right?) is different when i used length(The_geom) function.. do you know why? –  robi_blitzx Jun 7 '12 at 1:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.