graphhopper / map-matching

The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching
https://www.graphhopper.com/open-source/
Apache License 2.0
785 stars 273 forks source link

Allow HTTP request parameter to override the default weighting method. #52

Closed JarnoLeConte closed 8 years ago

JarnoLeConte commented 8 years ago

Override the default weighting method by adding a property weighting in the HTTP request.

The weighting property could be set to fastest or shortest.

Example request:

curl -XPOST \
-H "Content-Type: application/gpx+xml" \
-d @/path/to/gpx/file.gpx \
"localhost:8989/match?weighting=shortest"
karussell commented 8 years ago

Thanks!

I would prefer to use public Weighting createWeighting of the GraphHopper class and also have a test case for this. Would you have the time to make these changes?

karussell commented 8 years ago

Would you have some time to invest into this? Should be easy to refactor and use graphHopper.createWeighting

JarnoLeConte commented 8 years ago

On second thought, I'm not sure if this change is correct. I'm not sure if the match algorithm behaves properly by changing the weighting. Good tests should be required. At this moment I don't want to investigate in this feature anymore. Maybe at a later moment. A new pull request will be required. I think this pull request can be removed now. It requires further investigation.

karussell commented 8 years ago

Ok, thanks for the feedback. I'll close for now.