This is the implementation and testing of the Neo4j Navigator. The project is part of the master's thesis "Multimodal Navigation Applications for CityGML 3.0 using a Graph Database" by Felix Olbrich at TUM (Technical University of Munich).
Initial installation of Neo4j Desktop.
ATTENTION: Do not run the database before adding the files! Otherwise, the database will be created with the default setup and you will have to delete it and start over.
- Open the local DMBS folder via the ... menu

- Copy the content of the
neo4jDB/data/databases/neo4jfolder into the local DMBS folderdata/databases - Repeat the copy process for the
neo4jDB/data/transactions/neo4jfolder into the local DMBS folderdata/transactions - Run the DMBS
- If all works, the database should be running and the browser can be opened via the "Open" button in the DMBS
- Check if the
'neo4j'database is running and if the data is loaded correctly by running the following query in the browser:
MATCH (n) RETURN count(n);Here, the number of nodes is counted. If the result is 0 or the query does not work, the data is not loaded correctly. Repeat the steps above and check if the files are in the correct folders.
OR
MATCH (n) RETURN n LIMIT 25;Here, you should get a list of 25 nodes or a graph view of the nodes. If nothing is displayed, the data is not loaded correctly. Repeat the steps above and check if the files are in the correct folders.
Also, check the node and relationship labels in the sidebar of the Neo4j browser! Those should be the similar to the screenshot below.
- Install the Python packages from the
conda_package_requirements.yamlfile.
conda env create -f conda_package_requirements.yaml- Activate the environment
conda activate neo4j_navigatorconnection_test.py is a script to test if the connection to the Neo4j database works using the Neo4j Python driver. It tries to connect to the database and makes a simple query. The match query should return the total number of nodes if the connection works.
- Install the APOC plugin for Neo4j Desktop via the side menu when selecting the created database.

- When the database is still running, stop it then select APOC under the Plugins tab and click install.
- Add the database password to the file constants.py. If it does not exist, create it in the same folder as the other Python scripts. An example is given with the constants-example.py file.
username = "neo4j" # default username
password = "YOUR_PASSWORD_HERE" # default password is 'neo4j'- Run the pre-processing script main_test_preprocessor.py to add the necessary labels and properties to the database. ATTENTION!
- If you want to pre-process the default dataset, use the
default_preprocessing()function. - If you want to pre-process the garage dataset, use the
parking_garage_dataset_preprocessing()function. Using this function, the weight calculation will not be triggered, as the parking garage dataset requires a different approach for the weight calculation.
- If you want to pre-process the default dataset, use the
- To start the application run the GUI interface via the script UI_eel.py.
- A splash screen will appear while the application is loading. This may take a few seconds.
- After the application has loaded, the main screen will appear. The application is now ready to use.
- Select the start and destination nodes, either using UUIDs from TrafficSpaces, geographical coordinates or by clicking on the map after selecting the input box.
- Change the routing mode if necessary.
- Change the algorithm if needed.
- Start the routing by clicking the "Start Routing" button.
- Depending on the route length, the visualization may take a few seconds to load. The route will be displayed on the map and the route information will be displayed in the text box below the map.

- You can change the start and destination nodes and start a new routing by clicking the "Start Routing" button again after the routing has finished.
Use the parking_garage_routing_test(start_id, end_id) function as provided in the main_test_navigator.py file. You can manually change the start and destination node IDs in the function call. Default IDs are set which work for the synthetic 'Grafing Garage' dataset. The function will return the shortest path between the two nodes. If the path uses the entrance node of the parking garage, the routing will be split. A random parking spot will be chosen and a second routing will be performed from the entrance node to the parking spot. Then a third routing call connects the parking spot to the destination node.
The result is visualized in the console. In yellow, the route IDs to the garage are listed. In red, the routing IDs inside the garage to the parking spot are listed and in blue the route IDs from the parking spot to the destination node are listed. An example can be seen in the screenshot below.



