Using new planet pbf file leads to removing all subnetworks

Hi all!

I’ve been using graphhopper for a while now. However, I now have a problem loading the latest planet-latest.osm.pbf.

Starting the graph with the newest planet does not give an error. Only when I want to make a request after this, I get a PointNotFoundException.

In the log I see that while building the graph, all subnetworks are removed.

2022-04-01 19:01:03.423 [main] INFO  c.g.r.s.PrepareRoutingSubnetworks - foot - Found 237373025 subnetworks (237373025 single nodes and 0 components with more than one node, total nodes: 237373025), took: 9.655663s
2022-04-01 19:01:04.666 [main] INFO  c.g.r.s.PrepareRoutingSubnetworks - foot - Removed 237373025 subnetworks (biggest removed: 1 nodes) -> 0 subnetwork(s) left (smallest: 0, biggest: 0 nodes), total removed edges: 0, took: 1.2425297s
2022-04-01 19:01:13.836 [main] INFO  c.g.r.s.PrepareRoutingSubnetworks - bike - Found 237373025 subnetworks (237373025 single nodes and 0 components with more than one node, total nodes: 237373025), took: 9.169667s
2022-04-01 19:01:15.577 [main] INFO  c.g.r.s.PrepareRoutingSubnetworks - bike - Removed 237373025 subnetworks (biggest removed: 1 nodes) -> 0 subnetwork(s) left (smallest: 0, biggest: 0 nodes), total removed edges: 0, took: 1.7414423s
2022-04-01 19:01:15.582 [main] INFO  c.g.r.s.PrepareRoutingSubnetworks - motorcycle - Found 0 subnetworks (0 single edges and 0 components with more than one edge, total nodes: 0), took: 0.004294948s
2022-04-01 19:01:15.582 [main] INFO  c.g.r.s.PrepareRoutingSubnetworks - motorcycle - Removed 0 subnetworks (biggest removed: 0 edges) -> 0 subnetwork(s) left (smallest: 0, biggest: 0 edges), total removed edges: 0, took: 7.271E-6s
2022-04-01 19:01:15.582 [main] INFO  c.g.r.s.PrepareRoutingSubnetworks - Finished finding and removing subnetworks for 3 vehicles, took: 21.814444s, totalMB:46510, usedMB:8403

Does anyone have an idea how this problem started and how I can solve it?

This looks like all nodes are disconnected / all edges are blocked. What version of GraphHopper are you using, and what does your config.yml look like?

I do use an older version of GraphHopper, I started in 2020 and haven’t updated since. Where can I find my current version in the project?

Config looks like this:

graphhopper:
  datareader.file: netherlands-latest.osm.pbf # OSM input file
  graph.location: graph-gh
  profiles:
    - name: motorcycle
      vehicle: motorcycle
      weighting: custom
      custom_model_file: empty
#      turn_costs: true
#      u_turn_costs: 5000
    - name: bike
      vehicle: bike
      weighting: custom
      custom_model_file: empty
    - name: foot
      vehicle: foot
      weighting: custom
      custom_model_file: empty
  graph.flag_encoders: foot,bike,motorcycle|turn_costs=true
  graph.encoded_values: toll, surface
  graph.elevation.provider: srtm
# PRODUCTION
  graph.elevation.cache_dir: /data/srtm/
  graph.dataaccess: RAM_STORE

server:
  application_connectors:
    - type: http
      port: 8989
      # DEVELOPMENT
      bind_host: localhost
  admin_connectors:
    - type: http
      port: 8990
      # DEVELOPMENT
      bind_host: localhost

# PRODUCTION
logging:
  appenders:
    - type: file
      time_zone: UTC+1
      current_log_filename: /data/logs/graphhopper.log
      log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
      archive: true
      archived_log_filename_pattern: /data/logs/graphhopper-%d.log.gz
      archived_file_count: 7
      never_block: true
    - type: console
      time_zone: UTC+1
      log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"

So if I understand correctly, the problem could be that I’m using an old GraphHopper version?

Well, if you’ve been using the same version this entire time and now it stopped working all of a sudden the only reasonable explanation seems to be that your OSM file is broken somehow, or you changed your config file?

Indeed the only thing I’ve changed is adding a new planet-latest.osm.pbf file. Config has not been changed :thinking:.

And do you run into the same problem if you download and use another (smaller, older) file?

I do not have problems with OSM files from 2020, as my current GraphHopper is at v3. I think it would be a good idea to update my graphhopper anyway. After this I will try again with the latest OSM file. Thanks for your quick reply and feedback!

Ok, but OSM files from 2020 should definitely work with GraphHopper 3.0 as well.

Yes indeed, the 2020 OSM files do work with GH v3! I have no problem with those!

But I want to use the most recent OSM files, which as it seems, does not work with v3 :(. Hopefully v5 would do the trick.

Sorry I meant to say recent, 2022, files should definitely work with GH v3 as well

I just tried it myself:

… and it works as expected

2 Likes

Than there might be a fault on my side, thank you for reply

Powered by Discourse