Skip to content

Commit 71085ce

Browse files
committed
update README
1 parent 759b250 commit 71085ce

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

README.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Sandwych.MapMatchingKit is a GPS map-matching solution for .NET platform.
88

9-
This solution is porting from the [Barefoot](https://github.com/bmwcarit/barefoot) project which developed in Java.
9+
This library is ported from the [Barefoot](https://github.com/bmwcarit/barefoot) project which developed in Java.
1010

1111
<p align="center">
1212
<img src="doc/images/screenshots/qgis.png">
@@ -46,9 +46,37 @@ The API can and will change frequently, do not use it for production.
4646

4747
Sandwych.MapMatchingKit can be installed from [NuGet](https://www.nuget.org/packages/Sandwych.MapMatchingKit).
4848

49+
## Prepare Your Data
50+
51+
### Road Map
52+
53+
Field | Type | Description
54+
----- | ---- | -----------
55+
Id | long | The unique ID of road line
56+
Source | long | Starting vertex ID of the road line
57+
Target | long | Ending vertex ID of the road line
58+
Oneway | bool | Indicates the road is a one way road or not
59+
Oneway | bool | Indicates the road is a one way road or not
60+
Type | short | Indicates the type of the road (Optional)
61+
Priority | float | Road priority factor, which is greater or equal than one (default is 1.0)
62+
MaxForwardSpeed | float | Maximum speed limit for passing this road from source to target (default is 120.0km/h)
63+
MaxBackwardSpeed | float | Maximum speed limit for passing this road from target to source (default is 120.0km/h)
64+
Length | float | Length of road geometry in meters, can be computed if not provided
65+
Geometry | ILineString | An object of ILineString to represents the road.
66+
67+
68+
### GPS Samples
69+
70+
Field | Type | Description
71+
----- | ---- | -----------
72+
Id | long | The unique ID of the GPS point
73+
Time | DateTimeOffset | The timestamp of the GPS point
74+
Coordinate | Coordinate2D | Longtitude and latitude of the GPS point
75+
76+
4977
# Demo & Usage:
5078

51-
See directory `example/Sandwych.MapMatchingKit.Examples.HelloWorldApp` for a fully executable map-matching example.
79+
See the directory `example/Sandwych.MapMatchingKit.Examples.HelloWorldApp` for a fully executable map-matching example.
5280

5381
## Offline Map-Matching
5482

@@ -57,8 +85,10 @@ var spatial = new GeographySpatialOperation();
5785
var mapBuilder = new RoadMapBuilder(spatial);
5886
var roads = //load your road map
5987
var map = mapBuilder.AddRoads(roads).Build();
60-
var matcher = new Matcher(map, new DijkstraRouter<Road, RoadPoint>(), Costs.TimePriorityCost, spatial);
88+
var router = new DijkstraRouter<Road, RoadPoint>();
89+
var matcher = new Matcher(map, router, Costs.TimePriorityCost, spatial);
6190
var kstate = new MatcherKState();
91+
//Do the map-matching iteration
6292
foreach (var sample in samples)
6393
{
6494
var vector = matcher.Execute(kstate.Vector(), kstate.Sample, sample);
@@ -114,7 +144,8 @@ For code contributions (e.g. new features or bugfixes), please create a pull req
114144

115145
# Credits
116146

117-
* "barefoot" from BMW Car IT GmbH: [https://github.com/bmwcarit/barefoot](https://github.com/bmwcarit/barefoot)
147+
All honors belongs to the original Barefoot developed by BMW Car IT GmbH: [https://github.com/bmwcarit/barefoot](https://github.com/bmwcarit/barefoot)
148+
118149
* "hmm-lib" from BMW Car IT GmbH: [https://github.com/bmwcarit/hmm-lib](https://github.com/bmwcarit/hmm-lib)
119150
* "GeographicLib" from Charles Karney: [https://github.com/oldrev/GeographicLib](https://github.com/oldrev/GeographicLib)
120151
* "Nito.Collections.Deque" from Stephen Cleary: [https://github.com/StephenCleary/Deque](https://github.com/StephenCleary/Deque)

0 commit comments

Comments
 (0)