Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgRouting Wrapper for point to point dijkstra shortest path routing #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

smitadolly
Copy link

Hello Sir,

After getting motivation from you to create a wrapper for point to point routing, I have written this wrapper for point to point shortest path routing. There are scope to improve this more and I will work towards the same. For now, I want to contribute this wrapper to your repository so that other people also can make use of this and give feedback on the same.

Thanks and Regards
Smita Kumari Dolly
Senior Research Engineer,
CSTEP, Bangalore

This script has been written based on the fact that reverse length of the unidirectional link is 100000.0 in the routable table. Based on your case in the table, you can edit the value. Also this script is only fot shortest_path and not for shooting start etc.
@smitadolly smitadolly closed this Feb 6, 2014
@smitadolly smitadolly reopened this Feb 6, 2014
@woodbri
Copy link

woodbri commented Feb 6, 2014

Smita, Thank you for your work. I did a very quick look through your code and if I understand correctly what you mean by point to point is that you are creating a virtual edge by splitting the start and end edges at the point closest to the start and end points.

This is nice, thanks. I'll take a closer look tomorrow at the code.

One quick comment to simplify the code a lot is the you can use:

execute sql into variable;

rather than:

for variable in execute sql loop end loop;

when you are only returning one row or a single value. It will make the code much more readable.

Thank you for taking the time to make a pull request.

@smitadolly
Copy link
Author

Thanks Stephen, I will make the changes and will commit to github..

On 6 February 2014 11:02, Stephen Woodbridge notifications@github.comwrote:

Smita, Thank you for your work. I did a very quick look through your code
and if I understand corretly what you mean by point to point is that you
are creating a virtual edge fro by splitting the start and end edges at the
point closest to the start and end points.

This is nice, thanks. I'll take a closer look tomorrow at the code.

One quick comment to simplify the code a lot is the you can use:

execute sql into variable;

rather than:

for variable in execute sql loop end loop;

when you are only returning one row or a single value. It will make the
code much more readable.

Thank you for taking the time to make a pull request.

Reply to this email directly or view it on GitHubhttps://github.com//pull/4#issuecomment-34293934
.

Smita Kumari Dolly
Research Engineer
Center for Study of Science, Technology & Policy
Old CAIR Building, Raj Bhavan Circle
Bangalore 560 001

Made changes based on the feedback got from Stephen
@smitadolly
Copy link
Author

Hello Stephen, I made the changes, tested the script and committed to git-hub. It's working now.

replaced the single quote by double quote if osm_name have any single quote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants