-
-
Notifications
You must be signed in to change notification settings - Fork 367
GSoC 2023 Improving Parameters and Standardizing Results in pgr_withPointsDD Function for pgRouting
- Proposal
- Participants
- Weekly Report and Plan
- Log of Pull Requests
- Slides
- Final Report
- Pre-Bonding Period
- References
This project aims to enhance the functionality of the pgr_withPointsDD function in pgRouting by improving the 'driver_side' optional parameter, adding a result column and normalizing the output. And all overloads will be implemented(Single vertex & Multiple vertices). The pgr_withPointsDD function modifies the graph to include points and using Dijkstra algorithm, extracts all the nodes and points that have costs less than or equal to the value from the starting point. The edges extracted will conform to the corresponding spanning tree.
Signature of current pgr_withPointsDD function:
pgr_withPointsDD(Edges SQL, Points SQL, root vid, distance, [options A])
pgr_withPointsDD(Edges SQL, Points SQL, root vids, distance, [options B])
options A: [directed, driving_side, details]
options B: [directed, driving_side, details, equicost]
RETURNS SET OF (seq, [start_vid], node, edge, cost, agg_cost)
OR EMPTY SET
While the pgr_withPointsDD function has been successfully implemented, further improvements are necessary. Specifically, the result columns need to include depth of node, and the 'driver_side' optional parameter requires refinement to enhance routing control and accuracy. Additionally, normalizing the output of all overloads will make the function more user-friendly.
The pgr_withPointDD function will likely officially be part of the next major release, so it is very important to overload and improve it.
- The pgr_withPointsDD function is, in fact, the pgr_drivingDistance function equipped to handle routing issues where the inputs are custom points rather than existing nodes in the graph. This makes it better suited for use in real-world scenarios, providing more practical routing solutions.
- Standardize the output of the function pgr_withPointsDD by adding a column to make the returns including the depth of node, so that it has a unified output with other DD functions and expand the usability of the function.
- Improve documentation on how to migrate to new features, making it easy for users and other developers to adapt to the new overloaded function.
-
pgr_withPointsDD with all overloads:
- single vertex
- multiple vertices
-
driving_side CHAR:
- Before:
Value in[r, l, b]
indicating if the driving side is:
r
for right driving side.
l
for left driving side.
b
for both.
- After:
Value in
[r, R, L, l]
indicating if the driving side is:
r,R
for right driving side
l,L
for left driving side
Any other value (including NULL) will be considered as r
- Before:
-
Return columns on all overloads:
- Before:
seq, [start_vid], node, edge, cost, agg_cost
- After:
seq, depth, start_vid, node, edge, cost, agg_cost
- Before:
-
Users Documentation of the function.
-
Documentation on how to migrate to the new function.
-
pgTap test cases.
Detailed Proposal in PDF format
Title | GitHub Handle | Name |
---|---|---|
1st Mentor | @robe2 | Regina Obe |
2nd Mentor | @cvvergara | Vicky Vergara |
Student Developer | @squarege | Yige Huang |
- Introduce myself to the community, interact with mentors, and actively get involved in the discussion.
- Setting up the Development Environment
- Develop a better understanding of PostgreSQL, PostGIS and how they interact with pgRouting.
- Set up the wiki page to keep track of weekly progress.
- Introductory Mail - [SoC], [pgrouting-dev]
- Commmunity Bonding Period Report Mail - [SoC], [pgrouting-dev]
- Create the OSGeo User ID,request writing access to the OSGeo wiki, for editing all info related to my project.
- Set up the development environment.
- Interact with mentors, introduce myself to the community, and actively get involved in the discussion.
- Set up a wiki page to keep track of weekly progress.
- Add a wiki link to OSGeo's accepted student's wiki page.
- Studied GSoC students guide and the OSGeo recommendations for students.
- Introduce myself and my project on OSGeo's SOC and pgrouting-dev mailing list.
- Get familiar with pgRouting’s development style. Understand expected coding, documentation, and testing standards set by pgRouting.
- Develop a better understanding of PostgreSQL, PostGIS, Pl/pgSQL, and how they interact with pgRouting.
- Learn to create unit tests using pgTAP.
- Learned how and where to create Pull Request, merge and how to commit, etc.
- Created a public repository
GSoC-pgRouting
where all my works are reflected in the GSoC period. - Created a new branch named
squarege-2023
in the GSoC-pgRouting repository, where I will be merging all the Pull Requests.
-
May 8th
- Clarified the content structure of osgeo wiki page and pgrouting GSoC wiki page
- Reviewed pgRouting GSoC wiki page
- Dealt with an issue New OSGeo users are unable to edit the wiki pages
-
May 15th
- Discussed whether should change or keep the function names.
-
May 29th
- Prepared branch on GSoC repository
- Made first PR to the prepared branch
- Got clarity on where to begin work.
- Basic skeleton for documentation and tests
- Code skeleton of SQL , C and C++ code
-
Report Mail - [SoC], [pgrouting-dev]
-
What did I get done this week?
- Created a branch in the GSoC-pgRouting repository.
- Follow mentor's guide: Watched video at: pr-2521-simplify-dijkstra-code, together with the PR: pgRouting/pgrouting#2521.
- Studied how to standardize the output columns of a function, adjust documentation queries results, and other related tasks by following PR: pgRouting/pgrouting#2516.
- Made a PR of adding my name to the contributor's list.
-
What do I plan on doing next week?
- Catch up on my week 1 work.
- Start standardizing the output columns of
pgr_withPointsDD
.
-
Am I blocked on anything?
Due to my final exams, I wasn't able to devote so much time to the project that there was no real progress in code. But I will catch up on my work in the coming week. I have already communicated about this and received approval from mentor.
- Design and modify the acceptable values of the 'driving_side' parameter.
- Design and implement the addition of a 'depth' column to the result columns.
- Implementing pgr_withPointsDD() function with all overloads (Single Vertex & Multiple Vertices).
- Prepare the test data and design SQL query.
- Basic testing of the function.
- Prepare First coding report.
- Submit working pgr_withPointsDD() function along with its documentation (without pgTap test).
- Work on the feedback as provided from the First Evaluation.
- Bug fixing.
- Prepare second coding period Synopsis.
- pgTap unit tests.
- Migration documentation
- Query test using sample data on pgRouting documentation.
- Fixing bugs, test more.
- Working on the details of the document.
- Preparing for Final Delivery.
- Integrating to develop branch in the main repository.
- Review, complete and finalize all documentation and tests.
- Create a detailed final report.
- Submit complete project with all required functions, documentation and unit pgTap test cases.
- Submit final report and evaluation of mentors.