Artificial grid graph - import problem


#1

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 com.graphhopper.storage.BaseGraph.inPlaceNodeRemove(BaseGraph.java:742)
! at com.graphhopper.storage.GraphHopperStorage.optimize(GraphHopperStorage.java:239)
! at com.graphhopper.routing.subnetwork.PrepareRoutingSubnetworks.doWork(PrepareRoutingSubnetworks.java:91)
! at com.graphhopper.GraphHopper.cleanUp(GraphHopper.java:1405)
! at com.graphhopper.GraphHopper.process(GraphHopper.java:671)
! at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:641)
! at com.graphhopper.http.GraphHopperManaged.start(GraphHopperManaged.java:71)

The graph file is:

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

Thank you!


#2

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


#3

It is just 6 nodes and 5 ways.

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


#4

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.


#5

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”


#6

You can also find some example mini graphs that are used in some of the graphhopper tests in this folder: https://github.com/graphhopper/graphhopper/tree/master/core/files