For a particular case I’ve got a lot of HGV movements all over Europe from point A to point B. In order to manage all the data properly, in the data I added a unique ID so I know the exact routes after producing directions in ORS.
When excecuting the batch job from both layers, I’ve found a problem with the results.
QGIS handles the ID’s not as a unique number which belong to eachother, but uses the order of row numbers which is quite random.
In the results the route ‘‘from_id’’ towards ‘‘to_id’’ you see this as follows:
- Row number 1 = 3 to 6 (HOOGSTRATEN TO HOEGAARDEN and it has to be HOOGSTRATEN TO HOOGSTRATEN )
- Row number 2 = 9 to 3 (LEERDAM to HOOGSTRATEN and it has to be LEERDAM TO OOSTERHOUT )
- Row number 3 = 1 to 1 (by chance correct)
This is not the way I want it. The ‘‘from_id’’ and ‘‘to_id’’ has to be the same in order to produce a correct line which represents the route it drives.
To make it even more clear: in screenshot 1 (as a new member, I only may upload one screenshot) you see the generated directions. Route number 2 has to be from Leerdam to Oosterhout. From Leerdam, the only route it generated is the yellow one. But, you can see it doesn’t go to Oosterhout, but to Hoogstraten in Belgium.
Does someone has any idea to solve this problem?