Defining GPS Accuracy for MapMatching via CLI

Hi,

is it possible to define the GPS accuracy when using Map Matching from the Command Line? I can only find the parameter in the Map Matching UI at http://localhost:8989/maps/map-matching/

Thanks for your help!

Yes, there is a --gps_accuracy option:

1 Like

Great, thank you!

A follow-up question: Is it already possible to define custom profiles within Map Matching (e.g. to include roads with access=no)?

Thanks

No this is not implemented yet. There is this issue though: Support custom_model for /spt, /isochrone and /match · Issue #2261 · graphhopper/graphhopper · GitHub

Without using landmarks this is also relatively easy to do if you know a bit of java. You can just create the weighting in MapMatching.java, something like this:

  CustomWeighting weighting = CustomModelParser.createWeighting(encoder, turnCostProvider, 
new CustomModel().addToSpeed(Statement.If("road_class == MOTORWAY", Statement.Op.MULTIPLY, 0.8)));

But access=no is actually a bit more complicated because it is not included in custom models yet. So you probably need to adjust OSMRoadAccessParser and run the import again.

Thank you

Is it possible to do the same for the noise parameter, ‘measurementErrorSigma’?

I have tried simply changing the value in the MapMatching.java file and then performing the build, but this does not make a difference to the results - is that because I call the map matching through CLI?

The measurementErrorSigma parameter can be set via the gps_accuracy option via CLI or which parameter do you mean?