{"id":16200041,"url":"https://github.com/rinigus/positionsource-mapmatched-qml","last_synced_at":"2026-02-11T21:03:17.101Z","repository":{"id":74209946,"uuid":"141844297","full_name":"rinigus/positionsource-mapmatched-qml","owner":"rinigus","description":"QML PositionSource supporting map matching","archived":false,"fork":false,"pushed_at":"2018-08-03T20:48:41.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T17:48:57.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"QML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rinigus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-21T20:35:23.000Z","updated_at":"2018-08-03T20:48:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"b875bced-fc23-4a8c-9f8d-261c88b4fe8c","html_url":"https://github.com/rinigus/positionsource-mapmatched-qml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rinigus/positionsource-mapmatched-qml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinigus%2Fpositionsource-mapmatched-qml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinigus%2Fpositionsource-mapmatched-qml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinigus%2Fpositionsource-mapmatched-qml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinigus%2Fpositionsource-mapmatched-qml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rinigus","download_url":"https://codeload.github.com/rinigus/positionsource-mapmatched-qml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinigus%2Fpositionsource-mapmatched-qml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274218141,"owners_count":25243357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T09:29:06.374Z","updated_at":"2026-02-11T21:03:12.061Z","avatar_url":"https://github.com/rinigus.png","language":"QML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QML PositionSource with map matching support\n\nThis is a QML type - `PositionSourceMapMatched` - that is designed to\nbe an extended PositionSource. In addition to regular PositionSource\nfunctionality, it allows to determine current street name, direction\nof travel along the street, current speed limit. For that, it\ncommunicates with local [OSM Scout\nServer](https://rinigus.github.io/osmscout-server) and uses map\nmaptching functionality of\n[Valhalla](https://github.com/valhalla/valhalla).\n\nCommunication between PositionSourceMapMatched and OSM Scout Server is\nimplemented through DBus. Thus, to use this QML type, you would need\n\n* [OSM Scout Server](https://github.com/rinigus/osmscout-server)\n* [Nemo QML Plugin D-Bus](https://git.merproject.org/mer-core/nemo-qml-plugin-dbus)\n\nThe maps required for map matching can be downloaded by OSM Scout\nServer (GUI recommended).\n\nWhile, at present, the type exposes only street name, direction, and\nspeed limit, it can be easily extended to provide other information\nsupported by Valhalla's map matching functionality. Note that it is\nfocused on just-in-time data, not longer stretches.\n\n\n## Usage\n\nThe code is contained in a single QML file. So, copy\nPositionSourceMapMatched.qml into your source tree and use it via\nlocal import. Since its licensed under MIT license, it should be\ncompatible with the variuos open source and proprietary licenses.\n\nWhen used in the program, if the map matching mode is enabled,\n`PositionSourceMapMatched` will automatically request map matched\nposition and available data regarding it. If needed, it will try to\nstart OSM Scout Server through systemd socket activation and will\nfollow apperance / disappearance of the server on D-Bus. The\ncorresponding status is communicated via properties.\n\nIn addition to regular usage, there are facilities for the use of the\ntype in testing environment (feeding coordinates from outside) and\ntiming statistics.\n\nSee included example for usage of `PositionSourceMapMatched` and\nshowing available data.\n\n\n## API\n\nThe exported API follows QML\n[PositionSource](https://doc.qt.io/qt-5/qml-qtpositioning-positionsource.html).\n\nThe main limitations, when compared to the PositionSource, are:\n\n* `position` property is replaced by JS Object with the same\n  properties as the original. Thus, there are no methods or signals\n  associated with the changes with the properties of `position` (for\n  example, you cannot follow `onAltitudeValidChanged` signal of\n  `position`). However, changes in `position` property are signaled,\n  as usual, via on `onPositionChanged` of `PositionSourceMapMatched`.\n\n* `signal `**`updateTimeout()`** is not propagated due to the absence\n  of this signal in Sailfish QtPositioning module. Feel free to\n  uncomment the corresponding code in _master_ and _gps_ sections of\n  the code.\n\nThe public API is extending PositionSource via additional\nproperties. Below, the properties are described by their use:\nproduction, testing, and timining.\n\n### Properties\n\n* `real `**`direction`** Direction of travel along the matched street\n  or path. Given in degrees from true north.\n\n* `bool `**`directionValid`** True if `direction` contains valid data\n\n* `bool `**`mapMatchingAvailable`** True if OSM Scout Server is running\n  and exposing map matching via D-Bus\n\n* `int `**`mapMatchingMode`** Requested map matching mode. This\n  follows `enum Mode` values in valhallamapmatcher.h of OSM Scout\n  Server code. At present, the following modes are available (value and its\n  meaning listed below):\n\n  - 0 no map matching\n  - 1 car, \"auto\" in Valhalla API\n  - 2 car along shorter distance, \"auto_shorter\" in Valhalla API\n  - 3 bicycle\n  - 4 bus\n  - 5 pedestrian\n\n  Care will be taken to keep map matching modes backwards\n  compatible and only extension of the values is planned, if\n  needed.\n\n* `string `**`streetName`** Street name of the matched Valhalla's\n  edge. Can be empty due to the failed map matching or in the absence\n  of the street name in OSM data.\n\n* `real `**`streetSpeedAssumed`** Speed assumed for traveling along\n    the matched Valhalla's edge. Speed is given in meters/second,\n    negative in the absence of data.\n\n* `real `**`streetSpeedLimit`** Speed limit for traveling along the\n   matched Valhalla's edge. Speed is given in meters/second, negative\n   in the absence of data.\n\n\n### Timing statistics properties\n\nTiming statistics allows to determine performance of map\nmatching. Statistics is given by average, minimum and maximum call\ntimes. Call time is defined as a time elapsed from obtaining GPS\nposition change till receiving and processing the response of map\nmatching algorithm.\n\n* `bool `**`timingStatsEnable`** Set to `true` to enable timing\n  statistics. Statistics will be collected from the moment this\n  property is set to `true`.\n\n* `real `**`timingOverallAvr`** Average call time for map matching in\n  seconds. \n\n* `real `**`timingOverallMax`** Maximal call time for map matching in\n  seconds.\n\n* `real `**`timingOverallMin`** Minimal call time for map matching in\n  seconds.\n  \n\n### Testing\n\nTo simplify debugging in the absence of GPS signal, one can provide\ncoordinates by using **`testingCoordinate`** property. For example, as\nhas been done earlier for Poor Maps by @otsaloma, one can hook changes\nin map center QML item to this property. As soon as\n`testingCoordinate` is set, a timer will be started that will update\ninternal PositionSourceMapMatched with the same period as requested by\n`updateInterval`. To stop such testing, set `testingCoordinate` to\n`undefined`.\n\nSee included example for how to use this feature.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinigus%2Fpositionsource-mapmatched-qml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frinigus%2Fpositionsource-mapmatched-qml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinigus%2Fpositionsource-mapmatched-qml/lists"}