Artificial grid graph - import problem

I am trying to import my own graph, but the import fails.
Are there any minimal requirements / standards for the graph?
I have created my own osm file, converted it to pbf using osmconvert64.exe, then tried to rung graphhopper, but it fails with the error
ERROR [2019-05-29 18:05:21,602] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down
! java.lang.IllegalStateException: graph is empty after in-place removal but was 6
! at
! at
! at com.graphhopper.routing.subnetwork.PrepareRoutingSubnetworks.doWork(
! at com.graphhopper.GraphHopper.cleanUp(
! at com.graphhopper.GraphHopper.process(
! at com.graphhopper.GraphHopper.importOrLoad(
! at com.graphhopper.http.GraphHopperManaged.start(

The graph file is:

<?xml version="1.0" encoding="UTF-8"?>

Thank you!

grid25.txt (2.2 KB)
This is the .osm file, renamed to .txt

It is just 6 nodes and 5 ways.

I want to become familiar with the basic file structure and requirements for the graph.

I have commented out the cleanUp() method in the process() method and it seems to work now, but still - I would like to know what are the basic requirements for (simple) graphs to be used.

There are two properties which you have to set to 0 for small graphs:

prepare.min_network_size: 0
prepare.min_one_way_network_size: 0

Read more details about it: “Connection between locations not found”

You can also find some example mini graphs that are used in some of the graphhopper tests in this folder:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.