-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from NREL/ndr/fix-valhalla-matcher
fix valhalla road id assignment; bump version
- Loading branch information
Showing
4 changed files
with
28 additions
and
6 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from unittest import TestCase | ||
|
||
from mappymatch.constructs.trace import Trace | ||
from mappymatch.matchers.valhalla import ValhallaMatcher | ||
from tests import get_test_dir | ||
|
||
|
||
class TestTrace(TestCase): | ||
def test_valhalla_on_small_trace(self): | ||
file = get_test_dir() / "test_assets" / "test_trace.geojson" | ||
|
||
trace = Trace.from_geojson(file, xy=False) | ||
|
||
matcher = ValhallaMatcher() | ||
|
||
result = matcher.match_trace(trace) | ||
|
||
match_df = result.matches_to_dataframe() | ||
_ = result.path_to_dataframe() | ||
|
||
self.assertEqual(len(match_df), len(trace)) |