This repository has been archived by the owner on Mar 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 273
WIP: handling viterbi breaks as multiple sequences #87
Closed
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
2c1a010
initial work for handling viterbi breaks as multiple sequences
kodonnell d979ffd
handle case where viterbi breaks immediately after initialization
kodonnell 6b856f1
merge U-turn work
kodonnell ade4037
refactoring sequences
kodonnell 4b24cbc
use MatchEntry internally instead of GPXEntry
kodonnell 5832623
debug and fix tests
kodonnell b6c3af4
rename timestep -> viterbimatchentry
kodonnell c0e5574
fix other tests
kodonnell 2d184a2
tidying calcpath and gpxfile/main
kodonnell 791e53c
web stuff ...
kodonnell eed78bf
giving up on that test ...
kodonnell ac105e7
woops, don't need that anymore ...
kodonnell d6bf213
refactor + tidy + all tests passing
kodonnell 4e217d0
contiguous sequences
kodonnell f629883
undo test change to fix test change
kodonnell 9e6cc60
add logging in again as per @stefanholder's request
kodonnell 9d6f84b
Merge branch 'master' into sequences
kodonnell 7f45557
note funny bug ...
kodonnell 4a7420a
some changes as per @stefanholder
kodonnell 13707e1
bringing back the missing readme
kodonnell efb7b57
a few more tidyups
kodonnell 956e7d0
more tidy-ups
kodonnell 1dd88e8
utilise LocationIndexTree.findWithinRadius
kodonnell 56df0ab
ugly hacky gui ...
kodonnell 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,13 +124,13 @@ public void doPost(HttpServletRequest httpReq, HttpServletResponse httpRes) | |
matchRsp = matching.doWork(gpxFile.getEntries()); | ||
|
||
// fill GHResponse for identical structure | ||
Path path = matching.calcPath(matchRsp); | ||
Translation tr = trMap.getWithFallBack(locale); | ||
DouglasPeucker peucker = new DouglasPeucker().setMaxDistance(wayPointMaxDistance); | ||
PathMerger pathMerger = new PathMerger(). | ||
setDouglasPeucker(peucker). | ||
setSimplifyResponse(wayPointMaxDistance > 0); | ||
pathMerger.doWork(matchGHRsp, Collections.singletonList(path), tr); | ||
// Path path = matching.calcPath(matchRsp); | ||
// Translation tr = trMap.getWithFallBack(locale); | ||
// DouglasPeucker peucker = new DouglasPeucker().setMaxDistance(wayPointMaxDistance); | ||
// PathMerger pathMerger = new PathMerger(). | ||
// setDouglasPeucker(peucker). | ||
// setSimplifyResponse(wayPointMaxDistance > 0); | ||
// pathMerger.doWork(matchGHRsp, Collections.singletonList(path), tr); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this commented out? If the code is really not used anymore it should be deleted. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I didn't know how to get it working - I'll update that when I get the web stuff working. |
||
|
||
} catch (Exception ex) { | ||
matchGHRsp.addError(ex); | ||
|
@@ -181,7 +181,7 @@ public void doPost(HttpServletRequest httpReq, HttpServletResponse httpRes) | |
// decode simply by multiplying with 0.5 | ||
List<Integer> traversalKeylist = new ArrayList<Integer>(); | ||
for (MatchEdge em : matchRsp.getEdgeMatches()) { | ||
EdgeIteratorState edge = em.getEdgeState(); | ||
EdgeIteratorState edge = em.edge; | ||
traversalKeylist.add(GHUtility.createEdgeKey(edge.getBaseNode(), edge.getAdjNode(), edge.getEdge(), false)); | ||
} | ||
map.put("traversal_keys", traversalKeylist); | ||
|
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.
I think the map matching result should not contain SequenceState objects since these include internal data that is not relevant for the user. Hence, the relevant information should be extracted from SequenceState into separate result objects.
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.
I could just make it private? The user information (edges, original points in sequence, etc.) can be obtained by the user without it.
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.
Sure, this is also fine.
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.
Had to be package-private as it's used in MapMatching.java for debugging.
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.
OK, no problem.