I have a large number of locations (fiber end points from a large database) that I would like to calculate the distance between. In general, fibers tend to follow rail and highway right of ways so in the absence of actual fiber locations, I'm using the driving distance as the fiber length between two given points and the travel distance as the fiber length. For fibers where I have actual distances, the results are within 10% which is good enough for my application.
I'm having trouble with TravelDirections/TravelDistance only intermittently working. Even using the documentation example of:
TravelDistance[{Entity["City", {"Miami", "Florida", "UnitedStates"}],
Entity["City", {"NewYork", "NewYork", "UnitedStates"}]}]
Often returns $Failed without a reason. 2 minutes later, it will work for a while and then it will stop working again. The problem is that sometimes there is no good driving direction between the fiber endpoints even when TravelDirections IS working so there is no way for me to differentiate between the service not working and bad input points. My current approach is to first check if the example works and then if it does, try it on the fiber end points and hope that the service stays working for at least that long. Is anyone else experiencing this problem or have a clever solution? Thanks.