You swapped the X
and Y
function arguments, so you're passing the latitude as longitude, and the longitude as latitude. See the docs for how to use this function: https://osmnx.readthedocs.io/en/stable/user-reference.html#osmnx.distance.nearest_nodes