nearest facility + distance to a user

nearest_facility_dist(facility, user)

Arguments

facility

a matrix with longitude and latitude in the first two columns

user

a matrix with longitude and latitude in the first two columns

Value

matrix with 3 columns: user_id, facility_id, distance, where the user_id is the identifier for the user, the facility_id is the identifier for the facility that is closest to that user, and the distance is the distance in metres from that user to that facility.