Giter Site home page Giter Site logo

iisys-hof / map-matching-2 Goto Github PK

View Code? Open in Web Editor NEW
33.0 5.0 7.0 16.87 MB

High Performance Map Matching with Markov Decision Processes (MDPs) and Hidden Markov Models (HMMs).

License: GNU Affero General Public License v3.0

CMake 1.05% Dockerfile 0.06% C++ 98.89%
map-matching hidden-markov-model markov-decision-process q-learning value-iteration policy-iteration viterbi reinforcement-learning dynamic-programming markov-decision-processes

map-matching-2's Issues

Matching data from different coordinate systems.

Hello!

Lets say that I have some track of 2D points measured in meters from some origin, and map graph measured in latitude and longitude. Is there some way to match them without knowing origin's latitude, longitude and azimuth?

May be this matcher is capable of it or you can point to some method. This wolud be very helpfull.

Thanks.

File damaged after using --network-output

Hello!

I again encounter some problems :)
I've tried to transform network's srs and export it to file for other uses.
I used latest docker image with command:

./map_matching_2 \
  --network "/app/data/4seasons.osm.pbf" \
  --network-transform-srs "+proj=utm +zone=32" \
  --network-output "/app/data/4seasons_utm.osm.pbf" \
  --tracks-srs "+proj=utm +zone=32" \
  --readline \
  --verbose
Enabled network output.

Start Preparation ...
Import network ... done in 3.52163s
Graph has 320719 vertices and 629287 edges
Simplifying ... done in 0.911626s
Simplified graph has 89211 vertices and 205315 edges
Transform graph ... done in 1.19944s
Transformed graph has 89211 vertices and 205315 edges
Baking graph ... done in 0.132387s
Baked graph has 89211 vertices and 205315 edges
Saving osm file ... done in 0.655331s
Building spatial indices ... done in 0.129311s
Please input tracks one per line, either as LINESTRING or comma separated sequence of POINT (enter empty line for stopping):

Number of tracks: 0
Please input ground truth tracks for comparison one per line, either as LINESTRING or comma separated sequence of POINT (enter empty line for stopping):

Number of ground truth tracks for comparison: 0
Finished Preparation after 8.93809 seconds.

but didn't get output file 4seasons_utm.osm.pbf. Instead I have changed 4seasons.osm.pbf.
4seasons.osm.pbf before and after.
Moreover now I can't use this new file as input because I am getting errors:

./map_matching_2 \
  --network "/app/data/4seasons.osm.pbf" \
  --network-srs "+proj=utm +zone=32" \
  --tracks-srs "+proj=utm +zone=32" \
  --readline \
  --verbose
Start Preparation ...
Import network ... terminate called after throwing an instance of 'osmium::invalid_location'
  what():  invalid location
Aborted

I hope it can be easily fixed. Thanks!

P.S. Btw maybe you can add option like --export-only? So users will be able to transform network without setting fake tracks data.

Uninformative segmentation fault message

Hello, again!

I took your first example from readme, launched it in docker:

./map_matching_2 \
  --network "data/oberfranken-latest.osm.pbf" \
  --tracks "data/points_anonymized.csv" \
  --delimiter ";" \
  --id "device" --id "subid" \
  --x "lon" --y "lat" \
  --time "timestamp" --time-format "%F %T%Oz" \
  --output "data/matches.csv" \
  --verbose

and made mistake in it. I downloaded and used oberbayern-latest.osm.pbf instead of oberfranken-latest.osm.pbf. So obviously it didn't work, but I expected some message like "Matches was not found" or something, but I've got just "Segmentation fault" message and exit.

Start Preparation ...
Import network ... done in 29.7127s
Graph has 3415701 vertices and 6973660 edges
Simplifying ... done in 13.3145s
Simplified graph has 616925 vertices and 1477208 edges
Baking graph ... done in 1.22351s
Baked graph has 616925 vertices and 1477208 edges
Building spatial indices ... done in 7.66701s
Import tracks ... done in 1.28773s
Number of tracks: 1300
Finished Preparation after 56.4901 seconds.

Start Matching ...
Segmentation fault

I fixed my mistake and everything worked correctly.

Now i want to test my data. I took track data from 4seasons dataset (it was collected near Munich) and add origin point (in UTM32) to all coordinates then rounded it to meters and exclude duplicates for faster matching.
filtered.csv

I launched matcher:

./map_matching_2 \
  --network "/app/data/oberbayern-latest.osm.pbf" \
  --network-transform-srs +proj=utm +zone=32 \
  --tracks "/app/data/filtered.csv" \
  --tracks-srs +proj=utm +zone=32 \
  --delimiter " " \
  --no-header --no-id --x 0 --y 1 \
  --output "/app/data/f_matches.csv" \
  --verbose

I didn't expect good results since track is obviously wrong oriented but I again have segmentation fault message and don't know how to debug it. I checked with qgis that coordinates from filtered.csv are laying inside oberbayern-latest.osm.pbf.

Can you, please, make this message more informative? Thanks!

P.S. I tryed to compile your tool for windows and gave up. External dependencies just did not compile. Can you consider using vcpkg for managing them instead of cmake's fetch mechanism? At my expirience vcpkg works well enough for building windows, linux or crossplatform applications.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.