How do I create topology for ways and nodes

I have an .osm file that contains 3 roads. I constructed this file by hand (using JOSM) by laying down waypoints for each of the 3 roads.The 3 roads do touch each other.

Where one road intersects another, I “joined node to way” using the JOSM tool.
This allowed me to connect the intersection point of road A to road B.

I attempted to load this file into graphhopper but it complained: “Couldn’t load graph”.

What other information do I need to add to a road network in order for graphhopper to be able to construct routes along the paths of these roads ?

Thank you in advance !

See our test cases where we have handcrafted XMLs: https://github.com/graphhopper/graphhopper/tree/master/core/src/test/resources/com/graphhopper/reader BTW: did you include a highway tag?

I tried test-osm.xml, test-osm2.xml, test-osm3.xml, test-osm6.xml in my copy of graphhopper and still get a “Couldn’t load graph”.

The command line I use to run the program is this:

java -jar graphhopper-web-0.7-SNAPSHOT-with-dep.jar jetty.resourcebase=webapp config=config-example.properties osmreader.osm=test6.osm.xml

Also, on my data, yes, I have the highway tag defined: highway=NameOfEachRoad

GraphHopper only allows specific highway tag values like primary or secondary the road name should go into the name tag, see here for more information: https://wiki.openstreetmap.org/wiki/Key:highway

I tried test-osm.xml, test-osm2.xml, test-osm3.xml, test-osm6.xml in my copy of graphhopper and still get a “Couldn’t load graph”.

Sorry, no idea. Maybe you print the full logs here?

It looks like my error was a Window’s permissions problem. When I ran as “administrator” Graphhopper was able to write to all the directories and sub-directories it needed too. It then loaded my hand-crafted road network just fine.
Do note, all roads need to have this name=value tag assigned to them: highway:Name of Road.
Also note, you can use JOSM’s/Tools menu, “Join Node to Way” to make the topological connection between one road and another.
karussell, thank you for your comments !