There is error to execute maps matching

git clone https://github.com/graphhopper/graphhopper.git
    mvn package -DskipTests

Then:
java -Ddw.graphhopper.datareader.file=kazakhstan-latest.osm.pbf -jar web-bundle/target/*.jar server config-example.yml
or
java -jar web-bundle/target/graphhopper-web-bundle-3.0-SNAPSHOT.jar server config-example.yml
and I got:

no main manifest attribute, in web-bundle/target/graphhopper-web-bundle-3.0-SNAPSHOT.jar

I actually faced the same issue, just did not have time to start a post.

The .jar-file you used, as instructed on https://github.com/graphhopper/graphhopper/tree/master/map-matching seems to require further configuration.

I start the map matching server with the main web server binary

./graphhopper.sh -a web -i map.pbf

The matching funtionality seems to be present as documented in the map-matching page.

The integration of the map-matching from it’s own repository to the main repository seems pretty recent, it’s probably due to that that either the documentation or the .jar file need some fixing.

The .jar file with the matching cli command from https://github.com/graphhopper/map-matching still works, but is probably not a long term solution.

Yes the right command is:

java -jar web/target/graphhopper-web-3.0-SNAPSHOT.jar server config.yml

I just fixed the documentation here: https://github.com/graphhopper/graphhopper/commit/7317d85ae977f0f5ed538829472ca391a0023e89

Btw the getbounds command mentioned in the docs also currently does not work: https://github.com/graphhopper/graphhopper/issues/2235

1 Like

Previously the map-matching was available also as a separate CLI tool in addition to the GraphHopper server application. Do you know are there plans to bring it back to working condition in the main GraphHopper repository or will it be deprecated?

Which separate CLI tool for map matching do you mean? The script there is long gone, I think (?)

Probably this: https://github.com/graphhopper/map-matching/blob/07373dd885156b4c0d37884091ee40cf3413cc0a/matching-web/src/main/java/com/graphhopper/matching/http/MapMatchingApplication.java

The match command is still there https://github.com/graphhopper/graphhopper/blob/master/web/src/main/java/com/graphhopper/http/GraphHopperApplication.java

I see, thanks!

I though the match command:

java -jar web-bundle/target/graphhopper-web-3.0-SNAPSHOT.jar match

was not included in the main application web/target/graphhopper-web-3.0-SNAPSHOT.jar, and was only available in the web-bundle/target/graphhopper-web-3.0-SNAPSHOT.jar which no longer worked. Thus my confusion…

Thanks for the quick response

It should still work. What error do you get or did you figure it out?

I got the same error message as the original poster.

namely

miikama:graphhopper$ java -jar web-bundle/target/graphhopper-web-bundle-3.0-SNAPSHOT.jar --help
no main manifest attribute, in web-bundle/target/graphhopper-web-bundle-3.0-SNAPSHOT.jar

But the jar

miikama:graphhopper$ java -jar web/target/graphhopper-web-3.0-SNAPSHOT.jar --help
usage: java -jar graphhopper-web-3.0-SNAPSHOT.jar
       [-h] [-v] {server,check,import,match} ...

positional arguments:
  {server,check,import,match}
                         available commands

named arguments:
  -h, --help             show this help message and exit
  -v, --version          show the application version and exi

works.

1 Like