Closed MathiasVersichele closed 3 years ago
I'm beginning to fear custom costs aren't possible when looking at the source code. @cyang-kth could you confirm ? If this is the case, I won't be able to use this library :-(
Currently there is no way to set custom cost as it calculate the shortest path from geometry.
I compiled a network shapefile with the same structure as the edges.shp file in the repo, so with these fields:
I took care to define segments in both directions as stated in the docs. I then read in the network as such:
I get the following output:
Map-matching works technically, but it seems like it's just calculating shortest paths instead of fastest paths. E.g.
Black is gps-line, red is map-matched result. In "Schouwen-Duiveland" it takes a route over smaller roads instead of the highway to the south (through "Zierikzee"). I checked locally with pgrouting, and with the provided shapefile it should take that highway.
I can't find any docs on how to make sure that the "cost" field is actually used... But it's very important to get correct results for me. To see whether this field was maybe "silently" used, I changed the fields name from "cost" to "ccost", and no errors are thrown and the results look the same. So pretty confident that it's not used right now... How can I make sure that it is used ?