0

使用 R 和包 otpr 我正在尝试运行示例

library(otpr)
            otpcon <- otp_connect()

            otp_get_distance(
                otpcon,
                fromPlace = c(53.48805,-2.24258),
                toPlace = c(53.36484,-2.27108)
                )
        

但我得到了错误

$errorId
[1] 404

$errorMessage
[1] "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible."

$query
[1] "http://localhost:8080/otp/routers/default/plan?fromPlace=53.48805,-2.24258&toPlace=53.36484,-2.27108&mode=CAR"

我试图运行的示例取自这里:

https://cran.r-project.org/web/packages/otpr/readme/README.html

有谁知道可能出了什么问题?

尝试卸载重新安装所有java。然后我得到错误

Fejl i otp_connect() : 
  Router http://localhost:8080/otp/routers/default does not exist. Error code Error in curl::curl_fetch_memory(make_url(x)) : 
  Failed to connect to localhost port 8080: Connection refused
4

0 回答 0