-
Notifications
You must be signed in to change notification settings - Fork 77
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
Use PGRouting to handle routing directly in Database through API #4070
Draft
justinefricou
wants to merge
170
commits into
master
Choose a base branch
from
move_routing_to_backend
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
170 commits
Select commit
Hold shift + click to select a range
ab8936b
Add TrekGeometry view with get and post methods
5723906
Add a parameter to TrekGeometry post method
e3d0998
Add graph and steps info being sent to TrekGeometry view
bcc1e01
Add computing of the dijkstra matrix and start and end nodes (only ha…
0f84c13
Add computing of the path to follow (node to node) (handles whole edg…
64cad5c
Modify path in response: it's now from start to end
3841dad
Refacto: nodes idx to id correspondence
da2ba95
Add structure of algorithm handling partial edges and more than 2 steps
2146122
ADD handling of edge percentage and more than 2 markers
087e311
Add display of a hard-coded polyline sent from the TrekGeometry view
40cf585
The graph is directly taken from the backend
e77cb85
Add handling of GPS coordinates as input
cc5b615
Add use of Point ewkt when using sql
496e140
Add TODOs for next step: obtaining a LineString from dijkstra results
dcb207b
Starting to work on converting the resulting nodes list into LineStrings
d5231de
Add conversion of dijstra results into a displayed Linestring
6be5b61
Correctng some comments
bf02e89
Fix path not computed if adjacent steps are on the same edge
522b842
Fix negative dijkstra weight when we're going backwards relative to a…
6696f18
Fix path not computed when going backwards on a Path if going through…
fd4f0c0
Starting to display fetched route instead of locally computed route
262a1be
Preparing topology_helper to handle several linestrings
911e56f
Automating the geojson generation in the view
3ffac2e
Add handling of several steps
40d3914
Replacing MultiLineString by GeometryCollection in Response
c893bad
Fixing the organization of layers in the displayed path
e47d164
Removing old code related to the graph
1466005
Removing old code
03a9cae
Removing old code
0977216
Making the TrekGeometry post method into a PathViewSet action
7a23ce3
Reordering PathRouter methods
e6f7313
Removing graph action of PathViewSet
f8cdc8a
Moving initial graph generation into the PathRouter class
728108e
Removing no longer used imports
a49c625
Renaming graph.py to path_router.py
3255d30
Adding parameters error handling for the route_geometry action
f72cabc
Using dict.update instead of a custom method
b08a527
Adding status codes to Responses
9b4ca7a
Optimizing the cs_graph generation (generating the upper triangle the…
432041e
Optimizing matrix generation: it is now generated at init and modifie…
fb7783f
Optimizing matrix generation by using its symmetrical property
5bfff8b
Refactoring: making duplicate code into a method
c30123d
The route is now fetched only when the marker dragging stops
6c9e29e
Saving the dijkstra matrix in the cache
2f7360f
Saving the path graph in the cache
eff6c00
Moving duplicate cache-related code into a single method
5bb7cfe
Add handling of an impossible path: the view returns a status 204 and…
9d78eb3
Modify error handling in js: using Promise.reject
e05b9f1
Correct returns when no path could be found
be37394
Replaces status 204 by status 400 when no path can be found
87b6b4f
Add a spinner when the route is being fetched
1d9d3df
Add sending of the modified steps indexes to fetchRoute
ac07bb5
Adds fetching of the route for only the modified steps
8b8c35a
Add algorithm that updates the displayed route layers
7ca12fe
Add use of currently displayed layers indexes to replace them
3c12db5
Fix replacing the currently displayed layers indexes by new ones
4cdb3d7
Fix updating layers not working after removing a marker
e62ed49
Bump leaflet.textpath.js to v1.1.0
346db57
Move leaflet static files into a vendor directory
133cc1e
Bump leaflet.lineextremities.js to v0.1.1
1a68256
Fix missing path layer when an unlinkable via marker is removed
4e58ddf
Remove console logs
cb7a038
Add coloring of the markers when one is isolated
73ac66e
Add coloring of all markers to normal appearance when back to normal
1124dec
Add enabling/disabling of markers drag when a route is correct/incorrect
1a1d738
Add enabling/disabling of markers deletion when a route is correct/in…
ab08572
Add impossibility of creating new via-steps while the route is invalid
c4ade38
Move spinner.stop() into a finally()
c5b9fdb
Fix one route layer missing when an isolated via-step is corrected
61785c2
Add deletion of a marker if not dropped on a path
efd7c09
Add resetting of a marker to its previous valid position when not dro…
17d8dd9
Fix isolated marker highlight being removed when reset to its previou…
20bdc58
Remove duplicate part of code
169c4c2
Remove hiding of route layer when the start or end marker is moved
c1092aa
Fix out of date step idx used when deleting a via point
8b00ec8
Add display of an error toast when a marker is incorrect
e5af25f
Modify error_toast elements class names for genericity
2eab2e2
Fix toast stacking: top toast not on the bottom when it's the only on…
73dd40b
Fix wrong marker being deleted after trying to create an unsnapped ma…
66736ae
Fix route layer not displayed after start and end markers created and…
46b0e94
Add disabling of markers when the route is being fetched
8605485
Add saving of the route topology through the form
324aa6a
Add modification of the route topology through the edit form
c0e776b
Fix Geotrek object no longer created before use
justinefricou 2e77a83
Remove use of non-sparse matrix for dijkstra (using csr_array)
justinefricou 785bf6e
Modify use of sparse array (using lil_array instead of csr_array)
justinefricou 39ad419
Optimize dijkstra matrix generation
justinefricou 0479a7c
Remove calls to now deleted js scripts
justinefricou 9ded3c8
Remove no longer used methods
justinefricou f632c09
Add benchmarking system based on frontend routing version
justinefricou 0ac1d74
Fix typo in cypress.config.js
justinefricou 21aca15
Startng to work on adapting frontend benchmark system for backend
justinefricou 4507171
Add record of the number of runs for a benchmark measure
justinefricou 9c3caae
Modify route control clicking via cypress
justinefricou 3e0bf86
Replace broken 3 via-pts topology with a 2 via-pts topology
justinefricou 0113d99
Modify cypress benchmark: adapt the frontend version to work with bac…
justinefricou 17ebe8b
Modify python time measures: now in milliseconds instead of seconds
justinefricou 5d74120
Modify time measurement: startTime is now recorded before the click/d…
justinefricou 4366a2d
Modify benchmark.sh: making the session id a variable
justinefricou d05f53f
Add scenario using the big DB and no via point
justinefricou af3b210
Add display of current branch name for each measure
justinefricou b6391d7
Replace big database no via pts scenario with 25 via pts scenario
justinefricou dfd3479
Add readme for the benchmarking system
justinefricou b493a43
Modify benchmarking script: cypress spec file and session id are now …
justinefricou f1d4092
Fix crash when computing time averages if a file is missing
justinefricou 0421d5d
Add 2 via-pts topology for big database
justinefricou d644994
Replace 25-via-pts scenario with 2-via-pts scenario for big database
justinefricou 6657997
Add unit tests for route_geometry view (check of request body)
justinefricou 11b010e
Modify cypress timeouts: now 30min
justinefricou 7c0c5cb
Start to work on impossible and possible path test cases
justinefricou 215b10e
Add check of lat and lng type and range in route_geometry view
justinefricou f8250c9
Fix request body not sent in the right format (route_geometry tests)
justinefricou 2f9e808
Add new scenario for big DB with no via point
justinefricou 4f4a98d
Add test case: steps not on paths
justinefricou 7e28e04
Add test case: steps one paths not linked
justinefricou 37f0437
Add tests for route_geometry view
justinefricou 6a69385
Fix test for the route_geometry view
justinefricou b254420
Remove prints
justinefricou d627bf3
Move benchmarking directory into tools/
justinefricou e8d68e5
Fix norm
justinefricou a1023c2
Modify Cypress 'create trek' test after routing changes
justinefricou 6e7a67a
Try to fix cypress e2e tests
justinefricou af2a86e
Uncomment env_dev settings
justinefricou 1474572
Modify Cypress e2e tests: actually click on paths to create a trek
justinefricou 9e84bd3
Remove console.log and debugger
justinefricou 6d5a765
Fix cypress e2e tests: id of clicked path
justinefricou 764536a
Add test case for route_geometry view: error 500
justinefricou ea2fa26
Try to fix cypress tests: ensure the topology control is enabled befo…
justinefricou a32c588
Comment content of test_graph temporarily
justinefricou cb4ea32
Adapt graph generation tests to the new routing system
justinefricou 9faac24
Add tests for path_router
justinefricou 439ddcc
Add unit test for cache handling in path_router
justinefricou ca7acec
Fix cache-related test for PathRouter
justinefricou e24f46c
Modify test_route_geometry_not_fail_with_via_points_several_paths to …
justinefricou 20fb3d0
Modify route_geometry tests: more precision when checking results
justinefricou 2cdf4de
Remove old unit test for route_geometry view
justinefricou de63d77
Remove redundant unit test for path_router
justinefricou 401285f
Add script to take backend time measures
justinefricou 2297164
Add steps for route with 100 via-pts for backend time measures script
justinefricou 9caba2d
Fix topology used in 100-via-pts fixture
justinefricou 8d405b2
Add big database topology in backend time measuring script
justinefricou c3c034a
Improve readability of path_router test: using yied
justinefricou 6f66a7d
Update benchmark README to include the new script
justinefricou dd2e244
Fix requirements.txt after rebase
justinefricou b626d70
Modify leaflet map: start spinner and disable markers ASAP
justinefricou 78e3b03
Modify leaflet map: stop spinner and reenable markers as late as poss…
justinefricou e17d8e0
Adapt backend benchmark script to new PR
justinefricou 17513d7
Modify display of route layers: only redisplay those affected by a ro…
justinefricou 507d7aa
Fix route modif not saved if an incorrect marker has been fixed
justinefricou 563308c
Fix path layers not displayed at creation
justinefricou 81d72f6
Use pg routing (#4245)
justinefricou 762e191
🐛 [BUG] Fix reset layer
Chatewgne 0f4f2b0
🏗 [MAINT] Remove unused dependency scipy
Chatewgne a7f7c86
🏗 [MAINT] Remove unused dependency scipy
Chatewgne 85ea074
Fix code norm
justinefricou 3e311a7
Add pgrouting to check_versions command
justinefricou 420700a
Add warnings to changelog
justinefricou f2a74cb
Update installation and upgrade docs for pgrouting use
justinefricou 85cffb0
Fix doc: underline too short
justinefricou 548a0c7
Fix requirements.txt after rebase
justinefricou 37889ae
Bump pgrouting to v.3.0.0
justinefricou 902f2b2
Use pgr_full_version for check_versions command
justinefricou 39661aa
Refactoring routing unit tests
justinefricou 738e74c
Fix norm
justinefricou 9e3fcdf
Remove temporary comments
justinefricou d3f0b86
Refacto: remove duplicate checking of same case in unit tests
justinefricou efda6bd
Refacto unit tests: use path3 instead of path4 in some tests so that …
justinefricou 83570f9
Use pgRouting A star (#4263)
justinefricou 2f7697c
Invert path's direction in unit test case so that test coverage is co…
justinefricou e2359b7
Update changelog
justinefricou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicated paragraph