Jump to content

» «

Route planning with A* algorithm / How are streets referenced in GTA V and the paths.xml?

1 reply to this topic
  • Manuel2603

    Player Hater

  • New Members
  • Joined: 23 Jul 2017
  • Germany


Posted 23 July 2017 - 07:37 PM

Dear community,


thanks for all the great information!


I need some clarification regarding the map used in GTA V and the underlying paths.xml file.


This page had already many information:



But I wonder how to interpret the paths.xml file correctly.

This is my understanding so far:

- The map is represented as a graph with nodes and edges(links).

- Every node corresponds to the beginning of a piece of street/path including only one lane to the next node (or nodes? like at a junction for example when you can enter the junction on one lane but exit it on one of two lanes?)

- The edges(links) describe the attributes of the lanes, like width and type of the lane and since they include two node id's they also describe


Therefore if you have say a four lane road (two in driving direction, two in opposite direction), this corresponds to a total of eight nodes and four egdes(links) between them, right?


Or are only two nodes and four edges(links) sufficient?


What I don't really understand is how everything is referenced.

Is it referenced in a global coordinate frame? Do the (x,y,z) coordinates of a node for example correspond to the middle of every lane? If not, is there an underlying logic where nodes are placed on the real streets (I saw that the nodes sometimes correspond to the middle of a road, sometimes to a lane marking...that makes things complicated).


Ideally, what I want to do is to build a module that uses an A* algorithm for offline route planning purposes. Then I want to drop the car at a location and want the car to follow that exact planned path. Do you think something like that is possible? How difficult could the implementation be?


Looking forward to hear your thoughts and thanks you all in advance for reading this!


Best regards,



  • nondin

    Player Hater

  • Members
  • Joined: 03 Feb 2018
  • Hong-Kong


Posted 03 February 2018 - 11:29 AM Edited by nondin, 03 February 2018 - 03:58 PM.

As far as I know, there are separate nodes for each lane so the coordinates show exactly where the nodes are. 

The nodes may or may not be in the middle of a lane, because of developers' errors or the need to tell AI drivers where to switch lanes.

The nodes are in the middle because there are attributes defining how many lanes there are for this node.


It is possible to put a node in any location and ask AI to drive to it, but to do that you also need links(e.g. vlink in path.xml) from an existing node to the new node.


I don't know much in terms of coding so hope the above info helps.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users